ERROR: All returned items have to contain a property named "json"!

how to fix it ?

let test= [];
for (item of items) {
  test.push(item.json.dataExport)
    console.log(item.json.dataExport)
    console.log(test)
}
    return test;

Hey @zied_hamzaoui!

Welcome to the community :sparkling_heart:

Here’s the code snippet that might work

let test= [];
for (item of items) {
  test.push({json:item.json.dataExport})
    console.log(item.json.dataExport)
    console.log(test)
}
    return test;

Every item in the array should be returned within a JSON object. Refer this documentation to learn more about the n8n data structure: Key Concepts | Docs

Thank u !!

1 Like