I have this JSONObject which is returned as response from a 3rd party API.
[
[
{
"msg": "hi",
"uuid": "fc8c5dd3-d46c-4945-894d-6160f830d815"
},
{
"msg": "hihe",
"uuid": "fc8c5dd3-d46c-4945-894d-6160f830d815"
}
],
14281343855179004,
14281349424008428
]
How can I parse this?
This is what I get
[[{"msg":"hi","uuid":"fc8c5dd3-d46c-4945-894d-6160f830d815"},{"msg":"hihe","uuid":"fc8c5dd3-d46c-4945-894d-6160f830d815"}],14281343855179005,14281349424008427]
My Code
try {
JSONObject reader = new JSONObject(message.toString());
JSONObject sys = reader.getJSONObject("uuid");
String msg = sys.getString("msg");
System.out.println(msg);
} catch (JSONException e) {
e.printStackTrace();
}