title: How to store JSONcontaining Nested JSONArray
body: <p>I'm working on one app in which I have <code>JSON</code> Like..</p>
  
  <pre><code>    {
      "Group Details":
      [
          {
          "groupMasterId": "25",
          "GroupName": "Gangs of Beasts",
          "groupIcon": "http://xxx.xxx.xx.x/XYZ/images/evil.png",
          "GroupDescription": "Fellowzzzgroup",
          "GroupCreatedDate": "2014-04-30 15:41:01",
          "GroupMassage": "no such thing is like group msg",
          "UserData":
              [
              {"UserMobile": "1111111111","AdminFlag": "1"},
              {"UserMobile": "1234567890","AdminFlag": "0"},
              {"UserMobile": "9988776655","AdminFlag": "0"},
              {"UserMobile": "234t537535","AdminFlag": "0"},
              {"UserMobile": "3489869348","AdminFlag": "0"},
              {"UserMobile": "1234567890","AdminFlag": "0"}
              ]
          }
      ]
  }
  </code></pre>
  
  <p>I want to display Details on simple <code>TextView</code> and UserData in <code>ListView</code>..but the proble in I'm total confused with how to store this data.. I done following code to do it,,but not able to store all UserMobile in single <code>HashMap</code>...</p>
  
  <pre><code>JSONObject jsonObj = new JSONObject(jsonstr);
              GroupDetailsArray = jsonObj.getJSONArray(GROUPDETAILS);
              HashMap&lt;String, String&gt; groupuser = new HashMap&lt;String, String&gt;();
              for (int i = 0; i &lt; GroupDetailsArray.length(); i++) {
                  JSONObject l = GroupDetailsArray.getJSONObject(i);
                  // String ID= l.getString(GROUPMASTERID);
                  String NAME = l.getString(GROUPNAME);
                  String DESCRIPTION = l.getString(GROUPDESCRIPTION);
                  String DATE = l.getString(GROUPCREATEDDATE);
                  String ICON = l.getString(GROUPICON);
                  JSONArray UsedDataArray = l.getJSONArray(USERDATA);
                  String ADMIN;
                  for (int j = 0; j &lt; UsedDataArray.length(); j++) {
  
                      JSONObject l1 = UsedDataArray.getJSONObject(j);
                      if (l1 != null) {
                          String MOBILENUMBER = l1.getString(USERMOBILE);
  
                          if (l1.getString(ADMINFLAG).equals("0")) {
                              ADMIN = "Member";
                          } else {
                              ADMIN = "Admin";
                          }
                          // tmp hashmap for single group
                          groupuser.put(USERMOBILE, MOBILENUMBER);
                          groupuser.put(ADMINFLAG, ADMIN);
                      }
                  }
                  // tmp hashmap for single group
                  HashMap&lt;String, String&gt; group = new HashMap&lt;String, String&gt;();
  
                  // adding each child node to HashMap key =&gt; value
                  group.put(GROUPNAME, NAME);
                  group.put(GROUPDESCRIPTION, DESCRIPTION);
                  group.put(GROUPCREATEDDATE, DATE);
                  group.put(USERDATA, groupuser.toString());
                  group.put(GROUPICON, ICON);
                  // adding group to group list
                  Utility.groupdetailsarraylist.add(group);
                  Log.d("groupdetailsarraylist",
                          Utility.groupdetailsarraylist.toString());
              }
  </code></pre>
  
  <p>please help me to how to store data so that I can use it to store in next <code>Activity</code>...</p>