I have the following JSON file format :
{"code":200,
"status":"OK",
"data":[
{"timings":
{"Fajr":"03:11 (EET)",
"Sunrise":"04:54 (EET)",
"Dhuhr":"11:53 (EET)",
"Asr":"15:29 (EET)",
"Sunset":"18:52 (EET)",
"Maghrib":"18:52 (EET)",
"Isha":"20:23 (EET)",
"Imsak":"03:01 (EET)",
"Midnight":"23:53 (EET)"},....
I want to get the value of Asr (for example) & parse it into string variable, I tried the below but nothing works (Please note: response is successfully retrieved, so no issue with reaching the JSON file, but only to get the value of string).
String mfajr = response1.getJSONArray("data").getJSONObject(0)
.get("Fajr").toString();
String mdoher = response1.getJSONArray("data").getJSONObject(0)
.getJSONArray("timings")
.get(Integer.parseInt("Dhuhr")).toString();
HTTP/1.1blah blah, and it cannot end with},. Please show us a minimal reproducible example of your attempt so that we can figure out what you are actually doing.response1is. And what the exceptions (or whatever) are.