Hi all,
I have a geojson file, where I would like to concatenate the some key value pair to one as array. I have tried ListConcatenator however it simple concatenate without creating array. You can see the below my attempt and desired result. Thanks in advance.
Output of ListConcatenator
{
"type" : "Feature",
"geometry" : {
"type" : "LineString",
"coordinates" : [
[ 4.3458008766, 50.8345288033 ],
[ 4.346331954, 50.8348774905 ],
[ 4.3474423885, 50.8357197041 ]
]
},
"properties" : {
"osm_id" : "",
"osm_way_id" : "30010739",
"_amenity{0}.amenity" : "hospital",
"_amenity{1}.amenity" : "pharmacy",
"_amenity{2}.amenity" : "drinking_water",
"_amenity{3}.amenity" : "pub",
"_concatenated" : "hospital,waste_basket,pharmacy,drinking_water,pub"
}
}
Desired output
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
4.3458008766,
50.8345288033
],
[
4.346331954,
50.8348774905
],
[
4.3474423885,
50.8357197041
]
]
},
"properties": {
"osm_id": "",
"osm_way_id": "30010739",
"_amenity{0}.amenity": "hospital",
"_amenity{1}.amenity": "pharmacy",
"_amenity{2}.amenity": "drinking_water",
"_amenity{3}.amenity": "pub",
"_concatenated": [
"hospital",
"waste_basket",
"pharmacy",
"drinking_water",
"pub"
]
}
}