Straightening out JSON. From 1 item to rows

Just started with n8n today, have worked with some workflow tool before (like power automate). I run into a very simple problem. The data I get from a HTTP request looks like this:

“skip”: 0,
“take”: 2,
“rows”: [
“Code”: 1044,
“Name”: “Apple iPhone 5S 16 GB”,
“Group”: 4
“Activacode”: 1045,
“Name”: “Dell Latitude E5500”,
“Group”: 4

Looking at a tabular output, it gives me 3 columns (Skip, take, rows), and 1 item (0, 2 and the string of all the data in rows).

<slightly different screenshot, but the concept is the same:>

My problem is that when I try to get this into a table, or a spreadsheet file, it comes out as 2 lines. I have already tried Set to trim the HTTP request response.

My preferred output is this:

Code | Name | Group
1044 | Apple iPhone 5S 16 GB | 4
1045 | Dell Latitude E5500 | 4

Is there an easy way to do this? For example, in power automate/microsoft flow, you have to parse JSON. I was unable to find a similar feature in n8n.

Welcome to the community @Fioravanti!

It is possible to split out the data of an array into separate items with the Item List Node.
And renaming the keys can then be done with the Rename Node.

Here an example:

1 Like

Hi Jan,

Thank you so much. Your example did the trick. Comparing it with the Item List node I used earlier, I saw that yours just said ‘rows’ as Fixed, in stead of Expression like mine.

Thanks again, and happy holidays!

1 Like

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