I have a jArray and a string from that jArray, “message2”:
[{"date":"2012","count":"1","message" : "message1"}, {"date":"2011","count":"2","message":"message2"}}
How could I determine which JSONObject “message2” came from and then determine the “count” related to that message?
Pseudo code:
x = count of jArray element that contains the string "message2"
If the JSONArray is unsorted, this is the basic approach: