JSON input to Code Node includes "JSON" and "pairedItems" - just want JSON

I’ve got a workflow that takes in some spreadsheets and converts it to JSON for processing. Part of the flow passes the data into a Code node for additional processing. I need the Code node to just get the JSON as shown in the Input window, but it’s getting the JSON formatted in JSON and pairedItem objects instead of the pure JSON data I need.

I’ve tried calling the data using several different methods, but it nothing seems to work the way I need it to.

The screenshot shows The INPUT window as I need the data, the Code window, and the console.log showing what I’m getting in the code node.

My question is - how can I just add/recall the JSON as it appears in the INPUT window in the Code node OR manipulate it in the Code node to get what I want?

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

You need to look one level deeper into each item for the actual data.
Check these materials out:

If the above helps to resolve your question, please mark this post as a :white_check_mark: Solution.

1 Like

Thanks for your reply. After reviewing the video I found the “.map()” function and was able to map what I needed using “$(‘Sort’).all().map(json => json.json)”.

Thanks for your help!

I’m happy it helped.

With a bit of nerdiness, I’d name the map’s callback function parameter item rather than json because every item contains not only json part of data but also binary, also for the sake of future code readers or maintainers.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.