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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:59:14+00:00 2026-05-26T00:59:14+00:00

{status: FRE, list: [{make: Toyota, id: 1, model: camry, engine: Four Cylinder}{make: Ford, id:

  • 0
{"status": "FRE", "list": [{"make": "Toyota", "id": 1, "model": "camry", "engine": "Four Cylinder"}{"make": "Ford", "id": 3, "model": "focus", "engine": "Four Cylinder"}]}

How do I extract each “car” JSON object and put it into a native object? I’m using SBJSON. Here is my current code, but it is only able to extract one car element, when I need to be able to iterate through each car object and save it:

NSString *responseString = [request responseString];
     NSString *responseDict = [responseString JSONValue];

     NSArray *keys = [NSArray arrayWithObjects:@"id",@"make",@"model",@"engine", nil];
     NSArray *objects = [NSArray arrayWithObjects:[responseDict valueForKeyPath:@"list.make"],[responseDict valueForKeyPath:@"list.model"],[responseDict valueForKeyPath:@"list.id"],[responseDict valueForKeyPath:@"list.engine"] , nil];

     self.car = [[NSDictionary alloc]initWithObjects:objects forKeys:keys];
  • 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-26T00:59:15+00:00Added an answer on May 26, 2026 at 12:59 am

    Try to reason like this..
    when you do [[[request responseString] JSONValue] valueForKey:@"list"]]; it will return an array of list of your cars.

    Then you iterate each array and save it into your car element…

    Example:

    NSArray *arrayCar =  [NSArray arrayWithArray:[[[request responseString] JSONValue] valueForKey:@"list"]];
    
    
    for (NSDictionary *carDict in arrayCar) {
    Car car = [[Car alloc] init]; 
    car.id = [carDict valueForKey:@"id"]; 
    car.origin= [carDict valueForKey:@"make"];
     ... ... }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a status flag on my model which can take one of four
The Status of the gen_server is a list and should be processed once every
{ status:1, list: { 218888771: { item_id:218888771, title:twitter, url:http:\/\/t.co\/oFYGY7z0, time_updated:1347094862, time_added:1347094862, state:0 }, 217345740:
Status Time Handel Title --------- ------------ ------ ------------- CREATED 2009-10-16 03:37:38+01 902D8 Mozilla Firefox
git status tells me that my branch and the one I started from on
Array ( [status] => success [stories] => Array ( [0] => Array ( [name]
The status of the MQFTE agent is in problem state. What is the reason
Can we get relationship status changes of our friends from last 3 days including
My application provides a status depending on the date and time of day that
In the status notification doc here i read : A background service should never

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.