I am joining an API JSON that has multiples items into single item following the documentation: JavaScript Code Snippets | Docs
But I see in this case I have an issue, the API gets wrapped in Square brackets in which the system that I am importing does not accept wrapping square brackets.
Hi @jan,
How to ignore those since they also result from the API call? If I run these results via webhook, I get the [], if I run via another API provider (as I had originally) by default it has no []. Thanks.
Hi @jan,
I fixed it now differently, but if you mean inside the data_object correct, but when data is displayed as a single item, the [] are wrapping the single item array, I can show you two different endpoints and n8n gives different output than when I ran the other API.
n8n webhook
Different API builder provider
I am pulling this data into a website (php), I was able to fix just now by calling via “$data[0]” for n8n endpoint while originally (for the other provider) I used only $data.
I can share in private (sensitive data) the 2 different endpoints just for the curiosity of it, you will see what I mean .