mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-16 01:51:56 +08:00
Use the keyPath property to map a subset of the response for a single target object.
This commit is contained in:
@@ -154,7 +154,7 @@
|
||||
*/
|
||||
NSArray* results = nil;
|
||||
if (self.targetObject) {
|
||||
[self.objectMapper mapObject:self.targetObject fromString:[response bodyAsString]];
|
||||
[self.objectMapper mapObject:self.targetObject fromString:[response bodyAsString] keyPath:_keyPath];
|
||||
results = [NSArray arrayWithObject:self.targetObject];
|
||||
} else {
|
||||
id result = [self.objectMapper mapFromString:[response bodyAsString] toClass:self.objectClass keyPath:_keyPath];
|
||||
|
||||
Reference in New Issue
Block a user