Facing some issues in JSON hadling

Hi team

I am facing some issues in json handling. in below code, node is returning only gx_order_id and not parcel_number. when both keys are available in input

This happened for 5 th time in a week, sometimes it works sometime it does not.
Not sure what exactly issue is. can someone check this on priority as it is impacting our major flows

let result = $('Spreadsheet File').all()
let output = []
for(var i=0; i< result.length; i++){
  output.push({
    "parcel_number": result[i].json.parcel_number,
    "gx_order_id": result[i].json.parcel_reference3
  })
 }

return output
  • n8n version: 1.17.1
  • Database (default: SQLite): postgress
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker(railway)
  • Operating system:

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Rohit_Mali, I am sorry you are having trouble.

Unfortunately you didn’t provide an example spreadsheet or workflow, so I was unfortunately not able to reproduce the problem so far.

Running the below workflow seems to work as expected:

This is the result:

Can you share a workflow including example data using which your problem can be reproduced?

@Rohit_Mali , most likely you have misspelt the name of the property if the value does exist. If not, could you share a sample of the data that Spreadsheet returns?

[

{

" parcel_number": "060857",

"parcel_reference3": "1017150"

}, 
{

" parcel_number": "0608547602",

"parcel_reference3": "101733150"

}

]

Above is my input from the spreadsheet node. I have crosschecked it many times; there are no spelling mistakes. The weird thing is that sometimes it works and picks up the values, but sometimes it doesn’t, and this happens on the same day

@Rohit_Mali , note that you have an extra space in the name " parcel_number". That is the reason.
You either should fix it in the spreadsheet or use the reference in n8n that includes that extra space like this, result[i].json[" parcel_number"]

1 Like