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

  • Home
  • SEARCH
  • 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 7019627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:12:29+00:00 2026-05-27T23:12:29+00:00

How can I consume this JSon data in iOS 5 ({assets = ( {

  • 0

How can I consume this JSon data in iOS 5

({assets = ( { identity = 34DL3611;}, {identity = 34GF0512;}, {identity = 34HH1734;}, {identity = 34HH1736;}, {identity = 34YCJ15;} );

identity = DEMO;})

getting this data on console through this call

    id list =[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&error];

NSLog(@"VLIST: %@", list);

Now I have got the data in exact JSON format after using encoding:NSUTF8StringEncoding, I want to use native jsonserializer of iOS 5

NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];

the JSON data is:

[{"assets":[{"identity":"34DL3611"},{"identity":"34GF0512"},{"identity":"34HH1734"},{"identity":"34HH1736"},{"identity":"34YCJ15"}],"identity":"DEMO"}]

Now how can I get this data, so that I would get assets array values and populate them in table and get the value of identity(which is DEMO) to use it as a header.

thanx

  • 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-05-27T23:12:30+00:00Added an answer on May 27, 2026 at 11:12 pm

    It seems that you are able to successfully parse the JSON data and now would like to know how you can access the data. The parsed JSON data is either a NSDictionary or a NSArray instance containing NSDictionary, NSArray, NSString, NSNumber etc. instances.

    From your sample data, it looks as if your data is heavily nested. (The purpose isn’t quite clear.) It’s an array containing a dictionary containing an array containing a dictionary.

    You could access it like this:

    NSArray list =[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&error];
    NSDictionary dict = [list objectAtIndex: 0];
    NSArray assets = [dict objectForKey: @"assets"];
    NSString identity = [dict objectForKey: @"identity"];
    for (NSUInteger index = 0; index < [assets count]; index++) {
        NSDictionary itemDict = [assets objectAtIndex: index];
        NSString itemIdentity = [itemDict objectForKey: @"identity"];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to consume a json web service , this is the url :
I'm trying to consume a WCF webservice using jQuery. The returned Json data is:
Background this post explains how one can consume extension methods in Powershell http://community.bartdesmet.net/blogs/bart/archive/2007/09/06/extension-methods-in-windows-powershell.aspx Compare
I keep on getting a JSON parser error for the following data: [{data:Aerospace and
How does one consume web services that return JSON data in the response? I
I'd like ot know how I can consume the output of this service with
I've built an application that uses jQuery and JSON to consume an ASP.NET .asmx
I have a object that im serializing to a JSON object using JSON.Net. This
OK, I am quite new to this Objective-C and JSON thing, so please bare
I have defined an ajax dataFilter for my jQuery calls that return JSON data

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.