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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:51:41+00:00 2026-06-10T03:51:41+00:00

Ok my code is returning the array. My log for JSONArray bellow returns perfectly

  • 0

Ok my code is returning the array. My log for JSONArray bellow returns perfectly so I dont see why the dictionary is giving insane results posted below this code:

NSMutableArray *listOfparts = [[NSMutableArray alloc] init];
    for (NSDictionary *object in JSONArray) {
        Part *part = [[Part alloc] initWithpartName:object[@"case_name"]
                imageName:object[@"case_image"]];
        [listOfparts addObject:part];

    }
    NSLog(@"array: %@", JSONArray);

// Log for JSONArray – Looks nice //

array: (
        {
        "case_color" = White;
        "case_description" = "";
        "case_image" = "";
        "case_name" = "NZXT Phantom 410";
        "case_price" = "99.99";
        "case_type" = ATX;
        id = 1;
    },
        {
        "case_color" = Black;
        "case_description" = "";
        "case_image" = "";
        "case_name" = "Thermaltake MK+";
        "case_price" = "84.99";
        "case_type" = ATX;
        id = 2;
    }
)

// Log for listOfparts – Doesnt look good //

array: (
    "<Part: 0x71b5530>",
    "<Part: 0x71b5640>"
)

any help would be appreciated!

Update: I dont think my table is getting it right then

Part *eachpart = [listOfparts objectAtIndex:indexPath.row];
    cell.label.text = eachpart.part_name;
    cell.imageView.image = [UIImage imageNamed:eachpart.part_image];
  • 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-10T03:51:42+00:00Added an answer on June 10, 2026 at 3:51 am

    You are printing Parts which I think are classes made by you (like an UIButton or UIView), do these classes have properties like partName or imageName? Print those instead.

    Btw, your code seems to be working fine 🙂

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

Sidebar

Related Questions

jqGrid getRootNodes method is returning empty array, I'm using the following code to get
My code is returning a blank array of PropertyInfo PropertyInfo[] classProperties = typeof(Processor).GetProperties(); All
I am returning a JSON string from PHP: <?php $results = array( result =>
I have some code where I'm returning an array of objects. Here's a simplified
I can't push elements to works array. Console log is returning proper objects, but
The following code is returning an expression unused warning on the assignment operation in
For some reason, this line of code is returning undefined for $(this).attr(href) $(a).attr(href, javascript:page('
My cUrl call is returning HTML code like: &quot;Some stuff.&quot; and I'd like to
The issue is that VS2010 Code Analysis is returning two CA2000 warnings for a
I'm using CF 7 and this code is not returning any files: <cfset fileLocation

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.