this is what i am looking for
markers: marker[] = [
{
lat: 18.533989,
lng: 73.825592,
},
{
lat: 18.540474,
lng: 73.837510,
label: 'B',
},
{
lat: 18.540972,
lng: 73.832146,
label: 'C'
}
]
}
this is what i have tried
for (let i = 0; i < res.length; i++) {
// Iterate over numeric indexes from 0 to 5, as everyone expects.
let newobj = res[i].destinationAddress.location.coordinates;
console.log(newobj);
for(let j = 0; j < res.length; j ++){
this.markersArr.push(newobj[j]);
}
i am using angular 6 i need to convert json obj into array

{lat, lng}that you want to push in the array.