Using the Google Places API, you can only get 20 results back from a single query ... so you can't query for ALL results at once, but rather need to store what has already been searched for (in an array) and add to that array or remove from that array...
This demonstrates my question ... I need to be able to add places to my array, but then search through the array and remove any places that are no longer needed.
Is there a "compare array" function that I should be utilizing, or perhaps something better? I just feel that's quite rudimentary... and perhaps I'm missing some Google API function that's obvious.
My plan is to create an object:
var placesObj = {};
And since all places can have multiple "types", I need to be able to push each place id
into an array WITHIN the placesObj
like so:
var placesObj = {
bars: {'123123123123123', '123123123355555', '12312312132123'},
parks: {'123123123123123', '123123123355555', '12312312132123'}
};
This way, I can look for the id
string and remove it from the entire placesObj
...
I hope this makes sense... I just need to know how to construct this object.