That is correct, the code is not related at all, it’s just the example “Make Binary” to convert an item to binary and then write to a file. Yes it is correct, the first photo is my array, each item has nested json but there is not “main key”, heres an example of each item. I need each item to be writed to a file.
I do not expect any files, that array that i’m showing i need to be writed to a single file. The length could be 11 or 7 (it’s unpredictable). I just need to write a JSON Array to a file.
OK, then you lost me because you wrote now three different things (no file, one file, multiple files). Because between “I need each item to be writed to a file.” and “I do not expect any files, that array that i’m showing i need to be writed to a single file” is a big difference. Is it now a single file that contains an array or is it a file per item?
Please post a workflow example that contains a node that outputs exactly the data you have currently in the last node that you want to write (obviously the values of that objects can be different if it is sensitive data).
Additionally, also post a JSON-example with exactly the same data of how that file (or one of the multiple ones) you want to end up, should look like. To be 100% sure also tell me how many files you expect as output. Once you posted exactly that, I will have another look.
I understand, my mistake. The first photo shows the data on my last node (A Cortex Output, an array of JSON), the second photo shows an example of the data of each item (there’s more data but it can’t fit the screen). I expect only one file containing all the previous (for example, all 11 items).
Still not sure if the screenshot shows all the data or only one key which contains an array but for now assume it is all the data. In this case the following can be done:
That’s exactly what i wanted, Thanks! In this cases i’m kind of lost that why i’m so dependent on this forum. It will be nice to have a guide on how to handle arrays, because some nodes it relays on using items[0] as reference but in this particular case when it’s a plain array it’s kind of confusing on how to use certain nodes.