[Issue] Data Split

Hello,

I have a problem splitting my file.

My file contains all the paths in a single output but they are in one block.

I would like to split them to be able to manipulate each file name.

Eventually I want to integrate them into a database.

I notice that \n could be used but I’m having trouble with it

[
  {
    "code": 0,
    "signal": null,
    "stdout": "/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO\n/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO/Objet\n/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO/Objet/3.png\n/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO/Objet/1.png\n/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO/Objet/2.png\n/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO/1593543283_ComplexComplicatedAnteater-small.gif\n/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO/CUT x4.png",
    "stderr": ""
  }
]

I would like to get this output

[

 {
  "Path": 
   "/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO"
 },  

 {
  "Path": 
   "/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO/Objet/1.png"
 },

 {
  "Path": 
   "/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO/Objet/2.png"
 },

 {
  "Path": 
   "/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO/Objet/3.png"
 },

 {
  "Path": 
   "/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO/1593543283_ComplexComplicatedAnteater-small.gif"
 },

 {
  "Path": 
   "/srv/dev-disk-by-uuid-722a5e39-56b6-453f-b727-7d672707bed2/Home/Drthrax74/Images/CSGO/CUT x4.png"
 }

]

Thank you in advance.

@Marc_jaffre drop a Code node after ur Execute Command set to “Run Once for All Items” mode with this:

return $input.first().json.stdout
  .split('\n')
  .filter(p => p.trim())
  .map(path => ({ json: { path } }));

splits the stdout string on newlines, drops empty lines, emits one item per file path. downstream nodes then run once per path, which is what u want for the database insert step.

@Marc_jaffre

Can you try this?

@Marc_jaffre , this is more complete

Is this what you want?

Thank you very much.

Do you have any documentation you can suggest to me?

This?