Parse JSON elements and select specific elements to put in result

Hello. I am Trying to parse this REST response and loop results per every “id” entry and put specific objects in my result. However, when running the below code, I am getting the error ERROR: Cannot read properties of undefined (reading ‘every’) [Line 772]

What is the error message (if any)? ERROR: Cannot read properties of undefined (reading ‘every’) [Line 772]

Please share the workflow

Share the output returned by the last node

ERROR: Cannot read properties of undefined (reading ‘every’) [Line 772]

Information on your n8n setup

  • **n8n version:Desktop 1.6.0
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default)]:
  • Running n8n via [desktop app]:

You have more than two levels of array, and I prefer for ( i of array) loop, it much cleaner

2 Likes

Thanks tight-crow-1218 ! You approach is much cleaner and removes the need for the i incrementer.

Have a great day and thanks for the quick response,

Christian

1 Like