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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:06:31+00:00 2026-05-28T15:06:31+00:00

I Try to parse a Json feed with IOS 5. My Json File is

  • 0

I Try to parse a Json feed with IOS 5.

My Json File is like that :

{
  "status": "ok",
  "count": 18,
  "count_total": 2248,
  "pages": 125,
"posts": [
    {
      "id": 31781,
      "type": "post",
      "slug": "aaa",
      "url": "http:\/\/www.example.com\/videos\/aaa.html",
      "status": "publish",
      "title": "my Title",
      "title_plain": "My Title",
      "content": "<p>Jdfkdfkjkjdfklfdkldfkldfklfkdld.<\/p>\n",
      "excerpt": "Jdfkdfkjkjdfklfdkldfkldfklfkdlds.",
      "date": "2012-01-26 07:38:29",
      "modified": "2012-01-26 07:38:29",
      "categories": [
        {
          "id": 4,
          "slug": "videos",
          "title": "Videos",
          "description": "",
          "parent": 0,
          "post_count": 476
        }
      ],
      "tags": [],
      "author": {
        "id": 4,
        "slug": "author",
        "name": "Au Thor",
        "first_name": "",
        "last_name": "",
        "nickname": "Au Thor",
        "url": "",
        "description": ""
      },
      "attachments": [
        {
          "id": 31784,
          "url": "http:\/\/www.example.com\/wp-content\/uploads\/2012\/01\/primo.jpg",
          "slug": "primo",
          "title": "primo",
          "description": "",
          "caption": "",
          "parent": 31781,
          "mime_type": "image\/jpeg",
          "images": {
            "full": {
              "url": "http:\/\/www.example.com\/wp-content\/uploads\/2012\/01\/primo.jpg",
              "width": 620,
              "height": 389
            },
            "thumbnail": {
              "url": "http:\/\/www.example.com\/wp-content\/uploads\/2012\/01\/primo-150x75.jpg",
              "width": 150,
              "height": 75
            },
            "medium": {
              "url": "http:\/\/www.example.com\/wp-content\/uploads\/2012\/01\/primo.jpg",
              "width": 620,
              "height": 389
            },
            "large": {
              "url": "http:\/\/www.example.com\/wp-content\/uploads\/2012\/01\/primo.jpg",
              "width": 620,
              "height": 389
            }
          }
        }
      ],
      "comment_count": 1,
      "comment_status": "open",
      "thumbnail": "http:\/\/www.example.com\/wp-content\/uploads\/2012\/01\/primo-150x75.jpg"
    },

I have access to Title, content… like that :

NSArray* latestArticles = [json objectForKey:@"posts"];
NSDictionary* Article = [latestArticles objectAtIndex:0];
NSString *Titre = [Article objectForKey:@"title"];

But how I can have access to attachement > image > full > url field ?

I’m lost, and new with JSON…

Thanks for your help

  • 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-28T15:06:32+00:00Added an answer on May 28, 2026 at 3:06 pm

    Haven’t testest but I believe it would be.

    NSArray *allPosts = [json objectForKey:@"posts"];
    NSDictionary *firstPost = [allPosts objectAtIndex:0];
    NSArray *allAttachments = [firstPost objectForKey:@"attachments"];
    NSDictionary *firstAttachment = [allAttachments objectAtIndex:0];
    NSDictionary *allImages = [firstAttachment objectForKey:@"images"];
    NSDictionary *fullImage = [allImages objectForKey:@"full"];
    NSString *urlString = [fullImage objectForKey:@"url"];
    

    With NSJSONSerialization if you see [] the object will be an NSArray, if you see {} the object will be an NSDictionary.

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

Sidebar

Related Questions

I want to parse a JSON string: MyJsonString: { status: ok, count: 2, count_total:
I try to get parse JSON response for the following link: https://graph.facebook.com/feed/?ids=135395949809348,149531474996&access_token= The response
I have incoming messages that I need to try and parse in my own
I'm trying to parse some JSON object strings that I'm getting using gson-1.6.jar I
I'm trying to use a yui plugin that pulls from a json file and
I am attempting to parse a JSON feed from Yahoo Pipes to turn it
My question is the next: When i try parse a json params with 'json'
I try to parse json string using this method: QString ourJSONData = QString('{couchdb:Welcome,version:1.0.1}'); QString
I'm parsing JSON using GSON, but get an error when I try to parse
Receiving this error (JSON.parse: unexpected character) when I try to parse a JSON validated

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.