Matrix Version: 5.5.5.1
Hi,
I’m trying to create JSON file which checks if there is Geo data and prints the result. It works fine but for the last position format it doesn’t work therefore it prints the comma (,) and breaks the JSON format.
Not sure if this is a bug or I’m doing something wrong.
Thanks.
Here is the default format:
%begin_asset_metadata_tagGeoLongitude%
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
%asset_metadata_tagGeoLongitude%,
%asset_metadata_tagGeoLatitude%
]
},
"properties": {
"name": "%asset_name%",
"description": "%asset_metadata_description%",
"image": "%asset_metadata_image^as_asset:image_v_small_url%",
"region": "%asset_metadata_tagRegion^replace:-: ^titleize%",
"province": "%asset_metadata_tagProvince^replace:-: ^titleize%",
"link": "%asset_url%"
}
},
%else_asset%
%end_asset%
and here is the last position format
%begin_asset_metadata_tagGeoLongitude%
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
%asset_metadata_tagGeoLongitude%,
%asset_metadata_tagGeoLatitude%
]
},
"properties": {
"name": "%asset_name%",
"description": "%asset_metadata_description%",
"image": "%asset_metadata_image^as_asset:image_v_small_url%",
"region": "%asset_metadata_tagRegion^replace:-: ^titleize%",
"province": "%asset_metadata_tagProvince^replace:-: ^titleize%",
"link": "%asset_url%"
}
}
%else_asset%
%end_asset%