ios - Getting element from NSString -
my app data php web service , return nsstring
["first name","last name","adress","test@test","000-000-0000","password","code","0"]
how can second element ?
this json formatted string getting web service.
you must getting bytes server. replace variable have bytes stored variable "response data".
code:
nserror* error; nsarray* myresultarray = [nsjsonserialization jsonobjectwithdata:responsedata options:kniloptions error:&error];
you array in variable "myresultarray" , can value index.
code:
nsstring* first name = [myresultarray objectatindex:0];
Comments
Post a Comment