<verb> output (yes, cryptic.. please read)

Finally I have API connection to our network controller (TP-Link Omada).
I get a list of our devices and now I want to get some data per device.
The output is like this:
errorCode | msg | result
|0 |Success. |0
| | | type:ap
| | | mac:11-22-33-44-55-66
| | | name:XXXXXX
| | | model:EAP225
| | | compoundModel:EAP225(EU) v3.0
etc

Due to the fact the output is formated where item 1 is |0|Success.| and all other data/records are in that item/row There is only one Item where there are five devices:
0 Type: AP

1 Type: switch

2 Type: Gateway
,records.
etc.

What to do? Parsing, merging, splitting… have not all these verbs in knowledge and what they do/should do. Learning on the trip.
To me i think the needed output to continue should be
|0 | type:ap
| | mac:11-22-33-44-55-66
| | name:XXXXXX
| | model:EAP225
| | compoundModel:EAP225(EU) v3.0
|1 | type:switch
| | mac:
etc
|2 | type:gateway
| | mac:
etc…
How to transform (is that the correct verb) to this?
Hope I made this clear.
Thx in advance!

Hey @AXGuido,

What does the data look like in your output, Is it just that value in one JSON object or are there multiple parts to it?

My first thought would be to treat it like a CSV file with a pipe separator or use a .split(‘|’) to break it into chunks that you can work with, Maybe in a Code node or something so you can build out an object.

In JSON the output is as follows (did take out some data…)

[
{
“errorCode”:
0,
“msg”:
“Success.”,
“result”:
[
{
“type”:
“ap”,
“mac”:
“11-22-33-44-55-66”,
“name”:
“EAPNAME”,
“model”:
“EAP225”,
etc
},
{
“type”:
“switch”,
“mac”:
“AA-BB-CC-DD-EE-FF”,
“name”:
“SWITCHNAME”,
“model”:
etc
},
{
“type”:
“gateway”,
“mac”:
“1A-2B-3C-4DE-5E-6F”,
“name”:
“GWNAME”,
“model”:
“TL-ER7206”,
etc
}
]
}
]
SO, I believe it is in one object/item. But it holds three records if you get my drift. I am pretty new to this, I understand nut have not (yet) knowledge of all needs/possibilities and related processes/verbs. Learning by example works best for me.

Hey @AXGuido,

It sounds like what you need is the Item Lists node will take the data from this…

To something nicer like this…

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