I have a server with geographic data in normal json format, which I need to change into geojson format so Mapbox can read it. How do you do this?
For example, how do you convert this:
[
{
"id": 0,
"name": "Hotel",
"icon": "Sleep",
"address": "SampleStreet 34",
"latitude": 12,
"longitude": 55
}
]
into this:
{
"type": "FeatureCollection",
"features": [
{
"id": 0,
"type": "Feature",
"properties": {
"placeID": 0,
"name": "Hotel",
"icon": "sleep",
"addressFormatted": "SampleStreet 34"
},
"geometry": {
"type": "Point",
"coordinates": [
12,
55
]
}
}