I m performing JSON parsing.
In return i m getting the result something like this:
{"login":"FALSE","userid":"Please enter correct Email Address"}
I want to retain the userid: message into some variable, so that i can perform functions on the basis of userid itself.
Suggestion please.
Thanks
You can try with a framework such as this,https://github.com/stig/json-framework
Example usage would be, assuming userId is declared in your header file.
Now userId retains the value for the json value for userid from the json string
UPDATE: If you’re only supporting iOS >= 5.0 I would suggest the built in
NSJSONSerializationclass. If this is the case, your code will look more like this..Hope this helps !