My API is currently providing data in this format:
[
{
"lattitude": 52.57812538272844,
"longitude": -1.7111388218750108,
},
{
"lattitude": 53.043884,
"longitude": -2.923782,
}
]
I need to transform the data so that latitude becomes 'lat' and longitude becomes 'lng' like below:
[{
lat: 52.57812538272844,
lng: -1.7111388218750108,
},
{
lat: 52.3602160,
lng: 4.8891680,
}]
There are some missing fields which I will address later. Is there a way to achieve this without altering the API? I am using Angular-nativescript with a .net backend.