I'm trying to get a string from a JSONObject.
My JSON looks like this :
{
"agent":
[
{"name":"stringName1", "value":"stringValue1"},
{"name":"stringName2", "value":"stringValue2"}
]
}
I want to get the values from stringName1 and stringName2. So first, I tried to get the "agent" using this :
JSONObject agent = (JSONObject) jsonObject.get("agent");
However, this throws me an error.
Have you got any idea on how to process ?