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!