Issue
I need to get address, lat and lng:
let Orders= [{
pedido: this.listAddress[0].address,
lat: this.listAddress[0].lat,
lng: this.listAddress[0].lng
}]
But in that way, i only get the first item, i need to get all datas dynamically
0: {address:"test 00", lat:"00", lng:"00"}
1: {address:"test 01", lat:"01", lng:"01"}
2: {address:"test 02", lat:"01", lng:"02"}
3: {address:"test 03", lat:"01", lng:"03"}
Solution
const orders = listAddress.map(list => {
return ({
pedido: list.address,
lat: list.lat,
lng: list.lng
})
})
Answered By - JV10
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.