```
{"success":"true",
"groups":[  
   {  
      "groupId":"c20f2353-1f13-4ea0-8283-ghhjc4dcc725251b",
      "name":"hb",
      "description":"hjj",
      "image":null,
      "membersCount":1,
      "groupType":"chaddt",
      "productCategeory":"bdfjgh",
      "members":[  
         {  
            "memberId":"0031ea31-a71c-49f8ddbff6-8adaa310db02",
            "memberName":"ddddsnta",
            "contactId":"5a303564dd-2349-4cca-a190-f36f28ff54cb",
            "contactName":"dssnta",
            "role":"member"
         }
      ],

   }
]
}

```

This is my json.I am having some difficulty in parsing this.I am trying this solution.please suggest some ideas how to parse this type of json.Thanks for your answer

```
JSONArray jsonArray = jsonObject.getJSONArray("groups");

for (int i = 0; i < jsonArray.length(); i++) {
     groupid = jsonArray.getJSONObject(i).getString("groupId");
    String name = jsonArray.getJSONObject(i).getString("name");
    String description =jsonArray.getJSONObject(i).getString("description");
    String membersCount = jsonArray.getJSONObject(i).getString("membersCount");
    String intrested = jsonArray.getJSONObject(i).getString("productCategeory");
    JSONArray memberJsonArray = jsonArray.getJSONObject(i).getJSONArray("members");
    for (int j = 0; j < memberJsonArray.length(); j++) {
        String memberNamename = memberJsonArray.getJSONObject(j).getString("contactName");
        String contactId = memberJsonArray.getJSONObject(j).getString("contactId");
        String role = memberJsonArray.getJSONObject(j).getString("role");
        GroupsDto groupDtoData = new GroupsDto();
        groupDtoData.setGroupName(name);
        groupDtoData.setGroupServerId(groupid);
        System.out.println("groupid"+groupid);
        groupDtoData.setGroupDescription(description);
        groupDtoData.setProductCategory(intrested);
        System.out.println("descr"+intrested);
        groupDtoData.setGetmemberCount(membersCount);
        groupDtoData.setGroupmembername(memberNamename);
        System.out.println("membernames"+memberNamename);
        groupDto.add(groupDtoData);
        db.addGroups(groupDtoData);
}

```

This is my json.I am having some difficulty in parsing this.I am trying this solution.please suggest some ideas how to parse this type of json.Thanks for your answer