Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I try to parse JSON code formatted like this:
[ { "nsrId": "1020895", "koordinatLatLng": [ 59.7626, 10.03038 ], "navn": "Stenseth barnehage", "fylkesnummer": "06", "kommunenummer": "0625", "alder": "1 - 5", "eierform": "Privat", "antallBarn": 77 },.........
My Rest connection generates this code:
----------------------
RestConnectorMasterTable:
SQL SELECT
"nsrId",
"navn",
"fylkesnummer",
"kommunenummer",
"alder",
"eierform",
"antallBarn",
"__KEY_root",
(SELECT
"@Value",
"__FK_koordinatLatLng"
FROM "koordinatLatLng" FK "__FK_koordinatLatLng" ArrayValueAlias "@Value")
FROM JSON (wrap on) "root" PK "__KEY_root";
[koordinatLatLng]:
LOAD [@Value] AS [Lat],
[__FK_koordinatLatLng] AS [__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_koordinatLatLng]);
[root]:
LOAD [nsrId] AS [nsrId],
[navn] AS [Barnehage],
[kommunenummer] AS [Kommunenummer],
[alder] AS [Aldersspenn],
[eierform] AS [Eierform],
[antallBarn] AS [Antall barn],
[__KEY_root] AS [__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__KEY_root]);
DROP TABLE RestConnectorMasterTable;
------------------------------
I think this will be helpful for you: Re: Parsing JSON data with loop
- Marcus
Thank you for your contribution Marcus. However, I am not a developer and could not figure out any solution. I guess I must wait until our overloaded developer team can help me.