JSON String without root element in dataset

Hello, i am using CMS Version 3.3.2 and trying to create a dataset which gets the following JSON string as the API result:

[
{
“id”: 123456,
“coordinates”: [
{
“lat”: 47.000000,
“lon”: 15.000000
},
{
“lat”: 47.000000,
“lon”: 15.000000
},
{
“lat”: 47.000000,
“lon”: 15.000000
}
],
“openlr”: “XXX”,
“attributes”: [
{
“name”: “MapVersion”,
“value”: “1234567890”
},
{
“name”: “SegmentType”,
“value”: “DeletedOriginal”
},
{
“name”: “description”,
“value”: “Name of Closure1
},
{
“name”: “detourEditor_created”,
“value”: “Thu Dec 15 2022 07:36:08 GMT+0100 (Mitteleuropäische Normalzeit)”
},
{
“name”: “detourEditor_deletedByUser”,
“value”: “true”
},
{
“name”: “detourEditor_modified”,
“value”: “Wed Mar 29 2023 11:46:35 GMT+0200 (Mitteleuropäische Sommerzeit)”
},
{
“name”: “detourEditor_modifiedBy”,
“value”: “user@test”
},
{
“name”: “direction”,
“value”: “3”
},
{
“name”: “ovld_RS”,
“value”: “4095”
},
{
“name”: “validity”,
“value”: “0”
}
]
},
{
“id”: 123457,
“coordinates”: [
{
“lat”: 47.555555,
“lon”: 15.555555
},
{
“lat”: 47.555555,
“lon”: 15.555555
},
{
“lat”: 47.555555,
“lon”: 15.555555
},
{
“lat”: 47.555555,
“lon”: 15.414228
}
],
“openlr”: “XYXYXYXY”,
“attributes”: [
{
“name”: “MapVersion”,
“value”: “1234567890”
},
{
“name”: “SegmentType”,
“value”: “DeletedOriginal”
},
{
“name”: “description”,
“value”: “Name of Closure 2
},
{
“name”: “detourEditor_created”,
“value”: “Fri Dec 16 2022 09:43:39 GMT+0100 (Mitteleuropäische Normalzeit)”
},
{
“name”: “detourEditor_deletedByUser”,
“value”: “true”
},
{
“name”: “detourEditor_modified”,
“value”: “Wed Mar 29 2023 11:56:15 GMT+0200 (Mitteleuropäische Sommerzeit)”
},
{
“name”: “detourEditor_modifiedBy”,
“value”: “test@user”
},
{
“name”: “direction”,
“value”: “3”
},
{
“name”: “ovld_RS”,
“value”: “4095”
},
{
“name”: “validity”,
“value”: “0”
}
]
},

Since this notation dose not have an actual root element, I am unsure as to what to put into the data root field.

Further more i would like to put the highlighted parts in a column. What should i put as the remote data path in the column settings?

Any help is appreciated!

Ok, so i was able to display the “id” field in a column after just leaving the root element field empty in the dataset configuration. However, i still can’t get the “description” value of “attributes” (as highlighted) to work as a column. attributes[2].value would seem logical but it doesn’t work.

The solution was to keep the root element in the dataset empty and put attributes.2.value in the remote path in the column configuration

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