Home > Net >  Issue retrieving keys and values from nested JSON object
Issue retrieving keys and values from nested JSON object

Time:07-09

I need help retrieving the keys and values of this nested JSON. It is a JSON object of multiple values wrapped in another JSON object that is finally wrapped in an array. See an example of what I'm talking about

See what I'm referring to

I've used several codes but don't work.

Like

org.json.JSONObject jsonFile = new org.json.JSONObject(_response);
        org.json.JSONObject key = jsonFile.getJSONObject("x_metadata");

test1 = key.getString("wp_GP_ID");

See Image Here:

See Image Here

I'm using the WordPress rest API so I'll be glad if anyone can assist me

  • Related