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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:02:59+00:00 2026-06-15T17:02:59+00:00

I have searched all over for an answer to this and i’m sure it’s

  • 0

I have searched all over for an answer to this and i’m sure it’s simple, might just be me stuck in a corner after looking at this for so long! Hope someone can help. Apologies as i’m new to Objective-C/iOS.

I just want to be able to get a JSON response from my web service and save all the keys and values into a plist file. I know how to do this if I specify each object and key, but I don’t want to have to know every key and object, I just want to save them all. Whatever the JSON results give me.

Example JSON response from my web service:

{"result":[{"k_templateid":"2","tem_global":"1","tem_name":"iPad Template"}]}

I want to be able to add new database fields and value on the website, without the app needing to be updated each time, which is what i’d need to do now if I specified every object and key.

Example of what I have done previously in terms of specifying the keys and objects:

NSMutableDictionary* res = [[json objectForKey:@"result"] objectAtIndex:0];

NSMutableDictionary *things = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                                         [res objectForKey:@"k_templateid"], @"k_templateid",
                                                         [res objectForKey:@"tem_global"], @"tem_global",
                                                         [res objectForKey:@"tem_name"], @"tem_name",
                                                         nil];
[things writeToFile:path atomically:YES];

Hope this makes sense. This is likely answered elsewhere already but might be using the wrong terminology in my searches, I apologies in advance. Thanks for your help.

EDIT:
Apologies for not including the JSON part. I’m also using AFNetworking for JSON, not Apple’s JSON methods. JSON is called with:

[[API sharedInstance] commandWithParams:params
                           onCompletion:^(NSDictionary *json) {
  • 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-15T17:03:01+00:00Added an answer on June 15, 2026 at 5:03 pm

    From you description, I think you just want to do:

    NSDictionary* result = [[json objectForKey:@"result"] objectAtIndex:0];
    
    [result writeToFile:path atomically:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, this should be really simple, but I have searched all over for the
I've searched all over for an answer to this simple question, with no luck.
I have searched all over the web with no luck of making this project
I have searched all over stackoverflow and I can't find the answer that pertains
I searched all over the internet to find an answer for this. I am
I've searched for an answer for this all over but the solutions offered did
I have searched for this all over the web but can't seem to find
.NET/MVC3 newbie, so please bear with me! I've searched for this answer all over
I have searched all over for somebody else with this issue and found nothing...so
So I have searched all over the place and I can not seem to

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.