Trying to create/populate an array of objects via a change node... to avoid creating a function node and line code to do same. I at times need to prime an array, say initialize array that is sent to a table, that is later updated for example.
I know how to create an object via a change node but I have not cracked how to create an array of objects via change node. This has got to be easy... just have not figured the trick out as yet.
[{"id":"8b0c8ba2.f5e33","type":"inject","z":"332b4aa4.d68ec6","name":"Set Sonic 17,18","props":[{"p":"topic","vt":"str"},{"p":"payload"},{"p":"payload.trigger","v":"17","vt":"num"},{"p":"payload.echo","v":"18","vt":"num"},{"p":"payload.temperature","v":"20.0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"command/irrigation/TestListener/set/sonic/0","payload":"{}","payloadType":"json","x":180,"y":1620,"wires":[["69ba475c.3d234"]]},{"id":"b46851af.47c1b","type":"inject","z":"332b4aa4.d68ec6","name":"Set Sonic Sensors .0 17,18","props":[{"p":"topic","vt":"str"},{"p":"payload"},{"p":"payload.0","v":"[]","vt":"json"},{"p":"payload.0.trigger","v":"17","vt":"num"},{"p":"payload.0.echo","v":"18","vt":"num"},{"p":"payload.0.temperature","v":"20.0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"command/irrigation/TestListener/set/sonic","payload":"[]","payloadType":"json","x":160,"y":1660,"wires":[["69ba475c.3d234"]]},{"id":"5819d158.5a28e8","type":"inject","z":"332b4aa4.d68ec6","name":"Set Sonic Sensors [0] 17,18","props":[{"p":"topic","vt":"str"},{"p":"payload"},{"p":"payload[0]","v":"[]","vt":"json"},{"p":"payload[0].trigger","v":"17","vt":"num"},{"p":"payload[0].echo","v":"18","vt":"num"},{"p":"payload[0].temperature","v":"20.0","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"command/irrigation/TestListener/set/sonic","payload":"[]","payloadType":"json","x":160,"y":1700,"wires":[[]]}]