Re: [android-developers] Iterate Over JSONArray and update Arraylist Hashmap Android

2014-03-11 Thread TreKing
On Tue, Mar 11, 2014 at 3:09 PM, carbongixxer wrote: > Thanks for the response. I should have stated that this is specifically on > my Android app. Well, sure, I assume you're doing this in context of an Android app. But "in the context of Android" is not the same as "specifically an Android iss

Re: [android-developers] Iterate Over JSONArray and update Arraylist Hashmap Android

2014-03-11 Thread carbongixxer
Thanks for the response. I should have stated that this is specifically on my Android app. The JSON response is coming from my server. On Tuesday, March 11, 2014 1:00:44 PM UTC-7, TreKing wrote: > > This is not really Android specific, so you might benefit more from a > general forum, like Stac

Re: [android-developers] Iterate Over JSONArray and update Arraylist Hashmap Android

2014-03-11 Thread TreKing
This is not really Android specific, so you might benefit more from a general forum, like StackOverflow. Still, here's one idea. Keep a Map that tracks the count of each ID. First, iterate over the response and update the map as you encounter each ID (set to 1 if does not already exist, else + 1).

[android-developers] Iterate Over JSONArray and update Arraylist Hashmap Android

2014-03-10 Thread Kyle Phillips
I create an `Arraylist Hashmap` (shown below) by parsing a JSON response from Google Places API. Than I take the "id" strings and send them to my server to look for users with matching ids in my DB. Any matches I return the users in a JSON response (shown below). Now what I need to do is itera