Hi all, bit of a weird one for you - not sure I can really class this as a bug but it is certainly slightly off-spec.
When you send something to a debug node and it contains an array. The debug panel does not show any custom properties that the array may have, it only shows the numbered properties. However, if dumped to console, the custom properties are shown.
0|Node-RED | 6 Sep 15:36:49 - [info] [debug:output]
0|Node-RED | {
0|Node-RED | _group_: { quantity: 83681 },
0|Node-RED | France: [
0|Node-RED | {
0|Node-RED | region: 'Oceania',
0|Node-RED | country: 'France',
0|Node-RED | product: 'file',
0|Node-RED | sales: 784501.16,
0|Node-RED | currency: 'EUR',
0|Node-RED | date: '4/6/2020',
0|Node-RED | quantity: 691,
0|Node-RED | customer_name: 'Godart Mouget',
0|Node-RED | customer_email: 'gmouget0@epa.gov',
0|Node-RED | customer_address: '4 Center Road',
0|Node-RED | customer_city: 'Avignon',
0|Node-RED | customer_state: "Provence-Alpes-Côte d'Azur",
0|Node-RED | customer_country: 'China',
0|Node-RED | customer_postal_code: '84913 CEDEX 9',
0|Node-RED | order_id: 1
0|Node-RED | },
...
0|Node-RED | _group_: { quantity: 3164 }
0|Node-RED | ],
Hard to see in the example but I have a function that I'm writing that transforms an arbitrary input table (2d data, CSV, etc) into a hierarchical grouped object. The function allows for aggregation at each grouping level. The inner group is always an array of objects (as was the original input table).
JavaScript allows Array's to have custom named properties and I've made use of that here to add the _group_
property at every level including the inner arrays.
This works perfectly in the browser or in a Node.js app. As shown in the Node-RED log, it works in a function node too. However, the debug panel does not display the custom property. Which technically is incorrect I think?
Thoughts? Does this need raising as an issue?