Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8063227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:57:21+00:00 2026-06-05T10:57:21+00:00

I m performing JSON parsing. In return i m getting the result something like

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:57:23+00:00Added an answer on June 5, 2026 at 10:57 am

    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.

    SBJSON *parser = [[SBJSON alloc] init];
    
    NSArray *statuses = [parser objectWithString:json_string error:nil];
    
    userId = [statuses valueForKey:@"userid"]; 
    

    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 NSJSONSerialization class. If this is the case, your code will look more like this..

    NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
    
    NSMutableArray *jsonList = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:nil];
    
    userId = [jsonList valueForKey:@"userid"];
    
    NSLog(@"userid: %@", userId); // will print "Please enter correct Email Address"
    

    Hope this helps !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When performing many inserts into a database I would usually have code like this:
I'm using jQuery to parse a JSON result from Twitter. I'm then performing a
I'm am performing JSON deserialization with JSONTouch, but it's taking too long and it's
I am performing the following AJAX call: $(document).ready(function() { $.getJSON('https://sendgrid.com/api/user.stats.json', { 'api_user': 'me@mydomain.com', 'api_key':
When performing a block like: <% @user.favoured_user.each do |user| %> <li><%= user.name %></li> <%
While performing a refactoring, I ended up creating a method like the example below.
When performing a factor analysis using factanal the usual result is some loadings table
I've got a very slow performing page, because it's loaded down by JSON requests.
The jQuery docs strongly urge you not to set async to false when performing
We are currently performing searches on a Database and returning results in JSON format

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.