Hello. JSON string fragment.
{"creators":[ [ { "id":"30322", "professionKey":"director" } ], [ { "id":"1682023", "professionKey":"actor" }, { "id":"1876", "professionKey":"actor" } ], [ { "id":"31095", "professionKey":"producer" }, { "id":"1093329", "professionKey":"producer" } ]] }
Or briefly {"creators":[ [ { "id":"30322", "professionKey":"director"} ],[....] ] }
The difficulty lies in the following brackets. I believe that this is a two-dimensional array. Tried different options, c JSONArray, JSONObject. In the code below, put in getJSONArray (null) "". Please help.
JSONArray creatorsContent = parentObject.getJSONArray("creators"); JSONArray finalArray = creatorsContent.getJSONObject(0).getJSONArray(null); professionKEy=creatorsContent.getString("professionKey");