I am trying to retrieve things from the database and I am programming on an Android.
Currently my setup is I have the database and have php files that process things from the database and return a JSON
object. Then in my Android code I retrieve things from the JSON
object.
So part of my code is this :
JSONObject jObject = null;
jObject = new JSONObject(result);
username = (String)jObject.get("uName");
This works fine when there is only 1 item under the uName
that gets returned. However, lets say result has 3 things stored under uName
. If I do the way I have been doing it, it will just return the first one.
Is there a way for me to return every single thing under the uName
? If I do jObject.get("uName");
more than once it still just returns the first entry