Skip to content

Instantly share code, notes, and snippets.

@tehcpu
Created June 27, 2015 09:12
Show Gist options
  • Save tehcpu/85276fb357d8e137998e to your computer and use it in GitHub Desktop.
Save tehcpu/85276fb357d8e137998e to your computer and use it in GitHub Desktop.
nakanecta
JSONArray result = req.getJSONArray("response");
Map<String, List> data = new HashMap<String, List>();
for (int i=0; i < result.length(); i++ ) {
ArrayList<String> singleList = new ArrayList<String>();
singleList.add(String.valueOf(result.getJSONObject(i).get("first_name")));
singleList.add(String.valueOf(result.getJSONObject(i).get("last_name")));
singleList.add(String.valueOf(result.getJSONObject(i).get("photo_medium")));
Log.d("array_test", String.valueOf(singleList));
data.put(String.valueOf(result.getJSONObject(i).get("id")), singleList);
}
Log.d("array_test_get", String.valueOf(data.get("4005")));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment