[{// For most data:// Wrap each item in another object, with the key 'json'"json":{// Example data"apple":"beets","carrot":{"dill":1}},// For binary data:// Wrap each item in another object, with the key 'binary'"binary":{// Example data"apple-picture":{"data":"....",// Base64 encoded binary data (required)"mimeType":"image/png",// Best practice to set if possible (optional)"fileExtension":"png",// Best practice to set if possible (optional)"fileName":"example.png",// Best practice to set if possible (optional)}}},]
跳过键和数组语法
从 0.166.0 开始,使用 Function 节点或 Code 节点时,如果缺少键,n8n 会自动添加。如果需要,它还会自动将您的项目包装到数组 ( ) 中。这仅在使用 Function 节点或 Code 节点时才会发生。构建您自己的节点时,您仍然必须确保节点返回的数据包含键。