Dear All;
I wrote a php query which return the following JSON string :
[{"cnt":"0","user":"tamer"},{"cnt":"1","user":"Jose"}]

so In my blackberry application
I wrote the following :
Code:
returnString = returnStringBuffer.toString(); 

Dialog.alert(returnString); // examine return string String 

jsonString =new String("{"); jsonString= jsonString + "\""; 

jsonString= jsonString +"myArray\" : ";
 jsonString= jsonString +returnString;
 jsonString= jsonString +"}"; 

Dialog.alert(jsonString); // Now the call should succeed
 JSONObject myjson = new JSONObject(jsonString); 

JSONArray nameArray = myjson.names(); 
JSONArray valArray = myjson.toJSONArray(nameArray);

 Dialog.alert( nameArray.getString(0));
 Dialog.alert( valArray.getString(0)); 
Dialog.alert( nameArray.getString(0)); 
if (returnString.indexOf("1") != -1) { ret = true; }

so then I want to access for example like that :

valArray["cnt"][0];
valArray["user"][0];

how it should be done to navigate in the array elements???
regards...