Get only the 1st item in http request

Hello
I’m making an http request to an API,
I’m spliting into items, but there are some items that have more than one

(disabled the split only to print)

this gives me more outputs

image

How can I get only the 1st item?

I’m curious on what the json representation of this is? I can’t picture how it is organized

1 Like

It’s 2 objects, look at these 2 first itens

[
{
"id": 5701167127461888,
"name": "Troca Consciente",
"shareUrl": "https://clube.zupy.com/d/l/Ag4pjBcPY"
},
{
"id": 5717198596210688,
"name": "Voluntários",
"shareUrl": "https://clube.zupy.com/d/l/AlCEnGjfw"
}
],
[
{
"id": 4998207156256768,
"name": "Empório Martha Rocha",
"shareUrl": "https://clube.zupy.com/d/l/w3so2iE2u"
}
],

If you split items does it retain the shape of the object? Does it split ids ending in 888 and 688 off from 768?

Is that the desired function?

Hey @zupy,

Can we get the full output json to take a look at it? What do you mean by first item as well? The 0 column or the first row in 0?

Hello, thank your for helping me

The case is the following

I’m getting the API key from a table in Airtable and passing it in the Headers Authorization,
with these I make the request to get the ProgramID, split these and pass to another http request to get all the data from the API to save in the Airtable to complete the information.

All the data is related to a Program ID, that I use to make another request to get the full information

But some companies have more than one ProgramID, and in the iteration, if the input is like 5, the output is 6, what gives me an error in the next request, because the API Key isn’t related to the same record anymore.

I researched and discovered that isn’t possible to pass the Headers parameters to the next request
So I think if I just get the 1st item from these ProgramID Object that have 2 items It could work

The complete json is that, without Spliting, (with my comments)

[
// ----------------- these 2 items are from the same record, and it is splited into 2 items
[
{
“id”: 5701167127461888,
“name”: “Troca Consciente”,
“shareUrl”: “https://clube.zupy.com/d/l/Ag4pjBcPY
},
{
“id”: 5717198596210688,
“name”: “Voluntários”,
“shareUrl”: “https://clube.zupy.com/d/l/AlCEnGjfw
}
],
// -------------- the records that have only one ID, and works perfect
[
{
“id”: 5956075318673408,
“name”: “Studio Geek”,
“shareUrl”: “Studio Geek
}
],
[
{
“id”: 5743389763960832,
“name”: “Thai Rolls - É prova de amor”,
“shareUrl”: “Thai Rolls
}
],
[
{
“id”: 5781925236047872,
“name”: “Chic Chic - Moda Infantil”,
“shareUrl”: “Chic Chic Moda Infantil
}
],
[
{
“id”: 4601941674950656,
“name”: “#devora”,
“shareUrl”: “Pit Stop BBQ
}
]
]

IF Split it gives me 6 items

[
{
“id”: 5701167127461888,
“name”: “Troca Consciente”,
“shareUrl”: “https://clube.zupy.com/d/l/Ag4pjBcPY
},
{
“id”: 5717198596210688,
“name”: “Voluntários”,
“shareUrl”: “https://clube.zupy.com/d/l/AlCEnGjfw
},
{
“id”: 5956075318673408,
“name”: “Studio Geek”,
“shareUrl”: “Studio Geek
},
{
“id”: 5743389763960832,
“name”: “Thai Rolls - É prova de amor”,
“shareUrl”: “Thai Rolls
},
{
“id”: 5781925236047872,
“name”: “Chic Chic - Moda Infantil”,
“shareUrl”: “Chic Chic Moda Infantil
},
{
“id”: 4601941674950656,
“name”: “#devora”,
“shareUrl”: “Pit Stop BBQ
}
]

Hey @zupy,

What about using the Itemlist node to aggregate the 0 column, That would give you something like this: