Hi I created an activity, in that i want to get json data in spinner via List Adapter. How it possible please help me.
Using this code i get json data to Array List.
ArrayList<HashMap<String, String>> officeList;
for(int i=0; i<jsonArray.length();i++)
{
jsonObj = jsonArray.getJSONObject(i);
O_Id = jsonObj.getString("O_Id");
O_Name = jsonObj.getString("O_Name");
HashMap<String, String> contact = new HashMap<String, String>();
contact.put("office_id", O_Id);
contact.put("office_name", O_Name);
officeList.add(contact);
}
I want to get only "office_name" in the spinner.
How to attach officeList
into spinner.