0

I have a JSON response as follows in Android Studio

{"items":
 [{ 
  "username":"gadbe76p",
  "fname":"Ben",
  "lname":"Gadd",
  "jobtitle":"CSR"},
 ]}

How can I take that response and generate a Label and Switch, as to select that user or not for a function ?

I have no idea where to start. Sorry for the lack of basic understanding, very new to Android Studio.

So Label would contain fname and lname with the switch of on/off for value of username.

Cheers

James

Anoop B.K
  • 1,484
  • 2
  • 17
  • 31
James_Inger
  • 83
  • 2
  • 10
  • http://stackoverflow.com/questions/2591098/how-to-parse-json-in-java this link should help you and give you several examples – DavenMorris11 Sep 10 '15 at 06:12

1 Answers1

0

parse through the JSON object and place what you want parsed out into a variable then use that variable to set your labels