Creating files from json objects

Hello everyone. Firstly I'd like to thank members of this community for always helping out when needed. I appreciate it a lot, especially as a new node-red user.

Im trying to create a flow that reads json files that include 2 main objects: accountsList and transactionList.

Each one of the objects have a dynamic amount of sub objects.
For example, accountsList include a number of sub objects that each one represents a bank account, and transactionList represents a list of transactions.

I want to create a file out of every sub-object. i.e a file for each account and each transaction.

This is the the json format-

This is the flow structure-

This is the change node-
Screenshot_10

In the files that I want to create for each sub-object, i'd like to insert data only from specific fields.
How can that be possible?

Much thanks for any help!

If you feed the message into a Change node to move msg.payload.accountsList into msg.payload and then pass that to a Split node then it will output a message for each account which you can then use to create those files. Separately feed the original message into a Change node and a spilt node to do the same for the transactions.

Thanks as usual Colin!

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