I have a text file in a format of json. Like this:
{"a":"1","b":"2"}
I may encounter in a situation like this:
{"a":"1","b":"2","a":"2"}
I read the text and saving it in a string called data and then create a jsonobject:
JSONObject json = new JSONObject(data);
I want that the value for json[data]
will be "2" and not "1"
How can i do this?
Thanks