0

I have retrieved a string in JSON format(string name is "weatherJsonStr"), the string looks like this :

                 "... day": 28.09, "min": 2.73,"max": 28.09, ..."

I want to extract the value in front of max i.e 28.09 and store it in a variable. I have found the index where "max" starts, using the following code:

 String max="max";
 int index=weatherJsonStr.indexOf(max);

I am a little lost after that. I did end up doing :

int index=weatherJsonStr.indexOf(max)+5;//to get to the starting index of 28.09 

But I can't figure of how to extract the numeric value after that.

Rafay Khan
  • 1,070
  • 13
  • 25

0 Answers0