Hey @fporta, so instead of a single result field which is a string you’d like to have multiple items, each with fields like indice, pour_un_besoin_de, je_suis_le_composant etc.?
You’d essentially need to parse the string/convert it into a JSON object and split each separate result item up into an n8n element and move the fields within the result field to the top level of each item.
That’s a bit of custom logic required here, so I’d suggest using the Function node for this transformation. A snippet performing this transformation could look like so:
let results = [];
for (item of items) {
for (result of JSON.parse(item.json.result)) {
results.push({
json: result
});
}
}
return results;
This would run through all input items, then through each parsed result and pushes it to a new results array following n8n’s data structure. Once done it returns the results: