Monday 1 May 2017

Get field1 value from Array based on field2 data matching

Below is my sample json object, i want to get 'title' value based on longitude value. I have multiple(20-30) longitudes to get the tiles so i don't want to loop those many times.

{items:[ {longitude:-72.897668, latitude:40.453576, title:52 street}, {longitude:-71.897668, latitude:41.453576, title:5th Ave } .. .. ]} Can anyone suggest me how to get value without using for-loops.



via Bhargavi Chodisetty

No comments:

Post a Comment