I've an array of customers and I want to extract only lat and long of each customer and I want to get this kinda array
latLong=[{lat:123,long:322},{lat:111,long:333},{lat:33,long:11}]
here is my array of customers and I want to extract lat longi only from each object and put them into array of objects.
"customers": [
{
"id": "5",
"aname": "Sts Customers",
"type": "2",
"address": "house no e 4",
"area_id": "7",
"cell_no": "03334488",
"opn_type": "Debit",
"opngbl": "2564",
"lat": "33.7997",
"longi": "73.04052769999998",
"company_id": "1",
"acct_no": ""
},
{
"id": "14",
"aname": "New Customer",
"type": "2",
"address": "house no 4",
"area_id": "8",
"cell_no": "7878",
"opn_type": "Credit",
"opngbl": "2541",
"lat": "33.7997",
"longi": "73.04052769999998",
"company_id": "1",
"acct_no": ""
},
{
"id": "15",
"aname": "one more customer",
"type": "2",
"address": "jjkhklj",
"area_id": "8",
"cell_no": "8876987",
"opn_type": "Credit",
"opngbl": "454",
"lat": "33.7997",
"longi": "73.04052769999998",
"company_id": "1",
"acct_no": ""
}
],