Arr.flat() method

After struggling with parsing nested arrays and objects, I thought it would be nice if the JS arr.flat() method could work in Node-Red too.


Array.flat was added to node.js in version 11. So as long as you're running on that or later (we'd recommend Node 12), then you should be able to Array.flat.

Thanks! But how can I update it if I'm using Docker & Portainer? Then Node.js, npm & Node-Red are installed inside the docker...
Node-Red image is set as latest - v1.1.2

The default docker image is Node 10 based. If you want a 12 based image, you'd use nodered/node-red:latest-12.

Thanks a lot!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.