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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:24:54+00:00 2026-06-14T17:24:54+00:00

Good afternoon everyone, Currently, my REST API returns the JSON in the form {meta:{},

  • 0

Good afternoon everyone,

Currently, my REST API returns the JSON in the form {“meta”:{}, “objects”:{}}. (This is done using TastyPie). I would like back in iOS, to grab only the objects. Before I was using the line:

[omp setMapping:userMapping forKeyPath:@"objects"];

and it was working great. Now however, I have added quite a few more Mappings and I ended up doing something like this:

RKObjectMappingProvider *omp = [[RKObjectManager sharedManager] mappingProvider];

RKObjectMapping *cellMapping = [Cell mapping];
[omp addObjectMapping:cellMapping];
[omp setObjectMapping:cellMapping forResourcePathPattern:@"/cells/?format=json"];
[cellMapping setRootKeyPath:@"objects"];

RKObjectMapping *userMapping = [User mapping];
[omp addObjectMapping:userMapping];
[omp setObjectMapping:userMapping forResourcePathPattern:@"/users/?format=json"];
[omp setMapping:userMapping forKeyPath:@"objects"];

I have been using this http://kalapun.com/blog/2012/05/17/how-i-restkit/. But as you can guess, this won’t work if I load a Cell and try to get its properties, because “User” took the “Objects” mapping. Can I combine both of these fields forResourcePathPattern and forKeyPath?!

Also, what is the purpose of doing SetObjectMapping after AddObjectMapping? Do I need both?!

Thanks!

  • 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-14T17:24:56+00:00Added an answer on June 14, 2026 at 5:24 pm

    Fixed in RestKit 0.2! We will be able to directly insert a KeyPath, which is awesome!

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

Sidebar

Related Questions

Good afternoon to all, I have this scenario: I am using SQL Server 'BulkInsert'
Good afternoon, This should be an easy one. I've done the cookie-cutter default ASP.NET
Good afternoon, We are using the latest C/C++ version of PCRE on WINDOWS Visual
Good afternoon I'm hoping this is going to be nice and a simple f**k
Good afternoon, I am currently in the very early phase of a new project
Good afternoon everyone! As you may know, many companies that sell SSL certificates offer
Good afternoon all, I was taught that when a function returns, The variables (within
Good afternoon, We are building a prototype of a deduper. We are using a
Good Afternoon, I'm currently trying to build something incredibly simple inside of the Google
Good afternoon, I have three entities (that concern this question) Company (ID, etc..) CompanyAddress

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.