title: How to change JSON before mapping by RESTKIT
body: <p>I am using RESTKIT to map the JSON returned from server. </p>
  
  <p>The JSON result obtained from server is as follows</p>
  
  <pre><code>{"term":"Zh","results":{"users":[{"id":{"$oid":"4ebe59970a614e0019000055"},"term":"some text","score":1}]}
  </code></pre>
  
  <p>How can I convert the above JSON result to the below:</p>
  
  <pre><code>{"results":{"users":[{"uid":"4ebe59970a614e0019000055","text":"some text"}]}
  </code></pre>
  
  <p>Also, where can I do this so that the RESTKIT mapping will use the converted JSON instead of the initial one?</p>
  
  <p>Below is the loader class that I am using to manage the JSON and mappings</p>
  
  <pre><code>-(void)getObjects
  {
      RKObjectManager *sharedManager = [RKObjectManager sharedManager];
      [sharedManager loadObjectsAtResourcePath:self.resourcePath delegate:self];
  }
  
  - (void)request:(RKRequest*)request didLoadResponse:(RKResponse*)response {
      NSLog(@"Loaded PAYLOAD successfully for %@, with response %@", self.resourcePath , [response bodyAsString]  );
  }
  
  
  - (void)objectLoader:(RKObjectLoader*)objectLoader didLoadObjects:(NSArray*)objects 
  {
  }
  
  
  + (void)setManagerAndMappings
  {
      RKObjectManager* manager = [RKObjectManager objectManagerWithBaseURL:SERVER_URL];
      RKObjectMappingProvider* provider = [[RKObjectMappingProvider new] autorelease];
  
      //User Object Mapping
      RKObjectMapping* userMapping = [RKObjectMapping mappingForClass:[User class]];
      [userMapping mapKeyPath:@"_id" toAttribute:@"uid"];
  
      [userMapping mapAttributes:@"avatar_url",@"created_at",@"email",@"name",@"nickname",@"follower_count",@"following_count",@"answer_count",@"new_notification_count",@"new_questions_count",@"is_following",@"facebook_configured",@"twitter_configured",@"description",@"approved",@"type", nil];
      [provider setMapping:userMapping forKeyPath:@"user"];
  
  }
  </code></pre>