I want to convert my JsonObject into an ArrayList of latitude and longitude. I was striving with this problem three days without any result. Please help!
Here's my JSON:
{
"hits":[
{
"_geoloc":{
"lat":33.842624,
"lng":-5.480229
},
"objectID":"-KsPQUlvJK-PCSrH3Dq3"
},
{
"_geoloc":{
"lat":33.84878,
"lng":-5.481698
},
"objectID":"-KsPQUloi4BAduevPJta"
}
],
"nbHits":2,
"page":0,
"nbPages":1,
"hitsPerPage":20,
"processingTimeMS":1,
"exhaustiveNbHits":true,
"query":"",
"params":"aroundLatLng=33.62727138006218%2C-4.498191252350807&aroundRadius=545000"
}
Here's my code:
client.getIndex("users").searchAsync(query, new CompletionHandler() {
@Override
public void requestCompleted(JSONObject jsonObject, AlgoliaException e) {
}
});