Split Out Node/How to get data from array?

Hello all! I am a beginnner working with n8n recently. I have become stuck on a problem and I am not sure what the solution is. I have an HTTP Request node that is Getting an array of data which contains multiple objects. I want to try and separate each object out from the array but I’m struggling doing that.

This is the output from the HTTP Request node.

I tried using the Split Out Node and splitting out “data” but it is producing a weird result. It says it is producing two items but I can only see one.

If I examine the JSON output, it looks like there are two items there but I don’t know how to get to both.

JSON Details

[
{
“source”: “Playground”,
“id”: “b61713fc-944c-4e2a-8eb3-f4c516543f5b”,
“form_submission”: null,
“messages”: [
{
“role”: “assistant”,
“content”: “Hi! What can I help you with?”,
“createdAt”: “2025-11-09T05:20:27.431Z”
},
{
“id”: “34406bf0-c5d6-4068-8206-247afcc690d5”,
“role”: “user”,
“content”: “Test2”,
“createdAt”: “2025-11-09T05:20:27.431Z”
},
{
“id”: “517d0bb1-0148-4ed0-9ab2-29b7bb1d0773”,
“role”: “assistant”,
“type”: “text”,
“score”: 0.466796875,
“source”: “llm”,
“stepId”: “29494af2-02fe-4a39-96d9-3b49a42fe3bc”,
“content”: “Hello! How can I assist you with your printer today?”,
“createdAt”: “2025-11-09T05:20:30.243Z”,
“matchedSources”:
}
],
“min_score”: 0.466796875,
“created_at”: “2025-11-09T05:20:30.773611+00:00”,
“last_message_at”: “2025-11-09T05:20:30.773611+00:00”,
“country”: “United States”
},
{
“source”: “Playground”,
“id”: “50d50dbf-d61c-47f8-9099-0a72eda1b87b”,
“form_submission”: null,
“messages”: [
{
“role”: “assistant”,
“content”: “Hi! What can I help you with?”,
“createdAt”: “2025-11-09T04:57:36.212Z”
},
{
“id”: “86561ac7-091a-47a6-a218-d851a66d1f05”,
“role”: “user”,
“content”: “Test”,
“createdAt”: “2025-11-09T04:57:36.212Z”
},
{
“id”: “6095231d-c98d-416c-bf16-f3b5d2577a18”,
“role”: “assistant”,
“type”: “text”,
“score”: 0.53515625,
“source”: “llm”,
“stepId”: “ec6ff4e3-b626-48e6-b330-a2e11cd2c2dc”,
“content”: “Hello! How can I assist you with your printer today?”,
“createdAt”: “2025-11-09T04:57:38.358Z”,
“matchedSources”:
}
],
“min_score”: 0.53515625,
“created_at”: “2025-11-09T04:57:38.917591+00:00”,
“last_message_at”: “2025-11-09T04:57:38.917591+00:00”,
“country”: “United States”
}
]

When looking at the next node, which I currently have set as a filter node, I can only see one item as output even though it says there are two.

Can someone confirm that I am on the right track here or should I be trying to do something different? What am I doing wrong?

Thank you!

Ah this is something I struggled with too when I first started! It looks like you’ve done it right - if you click on ‘Table’ or ‘JSON’ in the top right of your input panel (next to ‘Schema’) you should be able to see the other value.

1 Like

Yes, this can be quite a tricky concept to do as n8n does not naturally show the items all together. You can see that is does show 2 items outputted which indicates that the following nodes will process items separately. As was mentioned earlier if you click on either the “Table” or “JSON” view at the top right of the output you will likely see a table first labeled “0, 1” in the first column with the appropriate data. In JSON you will also see the whole output with each value in a bolded 0: {data}, 1:{data} and so on for as many output items as is necessary. I hope this helps clarify things.

1 Like

Thank you both @flo_forster and @AnthonyAtXRay. I greatly appreciate your help. I do have an additional question if I could ask for further assistance.

When examining the output in Table or JSON view as you both described, I am able to see both the items.

However, I am running into an issue with my next node. I have the next node set as a Filter node. My goal is to search each of these items for a specific id and then only move forward with the item that matches the correct id.

I believed that the split out node would separate the objects into two different items that could be examined independently of each other, but it does not seem to be working that way. Whether I select the ID from the top item or the bottom item, it defaults to the same string and passes along all the same information as true because the ID is there.

Is there something else I have to do to separate these two items as different from each other or what should I do to achieve my goal?

Thank you!

It sort of depends on what you’re trying to do:

  • One thing you could try is an IF node with {{ $json.id }} “is equal to” the id you want (which from your screengrab might be b61713fc-…)
  • Another option could be using a SWITCH node with a rule for each ID you want to examine
  • Or if you only want to keep one of them then you could use a FILTER or LIMIT node
1 Like

Well, the IF node seemed to work. I thought for sure that I tried that before and it didn’t work but when testing today it seemed to work properly.

Thank you so much!

2 Likes