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 7019595
In Process

The Archive Base Latest Questions

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

i have this data structure : { artistlist : [ { performer : Gate

  • 0

i have this data structure :

{ 
  "artistlist " : [ 
                    {
                      "performer" : "Gate Zero"
                    },
                    {
                      "performer" : "nightech"
                    },
                    {
                      "performer" : "Marko Fuerstenberg"
                    },

                  ] 
   }

I read this structure from NSString into NSDictionary with this line of code:

   JSON = [NSJSONSerialization JSONObjectWithData:
   [[chunks objectAtIndex:1]        
   dataUsingEncoding:NSUTF8StringEncoding] options:              
   NSJSONReadingMutableContainers error: &e];

with: [JSON objectForKey:@"artistlist "] i get this structure:

(
    {
    performer = "Gate Zero";
},
    {
    performer = nightech;
},
    {
    performer = "Marko Fuerstenberg";
}
)

Is there any way to go “deeper” ?

how would i parse the resulting Structure ?

I would like to get a list of values or access performer names directly. What if i have several values in a tupel for example performer name, album, year. How would i access those values?

Thank you.

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

    Yes, after you have [JSON objectForKey:@"artistlist "], you get an NSArray of NSDictionaries (slightly confusing!).

    NSArray *performersArray = [JSON objectForKey:@"artistlist"];  
    for (NSDictionary *performerDic in performersArray) {
        NSLog(@"%@", [performerDic objectForKey:@"performer"]);
    }
    

    This should yield each performer name. Alternatively, you can do for (NSUInteger i = 0; i < [performersArray count]; i++) and access NSDictionary *performersDic = [performersArray objectAtIndex: i]. From there, you can similarly use [performsDic objectForKey:@"performer"]

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

Sidebar

Related Questions

I have a data structure that represents C# code like this: class Namespace: string
I have this data from a xml file: <?xml version=1.0 encoding=utf-8 ?> <words> <id>...</id>
I have this Javascript data: [{id:123,type:test},{id:154,type:another}] How would you transform that into something so
I have this data structure: request ======= building_id lot_code building ======== building_id lot_id lot
I have a data structure that looks like this: data =[ {'key_1': { 'calc1':
I have this html structure: <div id=home> <div class=section_header> <h1 class=left data-target=newest><?=lang('home_newest');?></h1> ... </div>
I have this table/data structure: ID Area Postcode ------------------------ 1 Area 1 EN1 1NE
I have this data structure (basically): (setq ssm-list '(tasklist ((id . 10525295) (name .
I have a data-structure (in plist) that looks something like this: What i have
i have this code below that loops through a data structure builds up a

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.