RestKit Object mapping issue - ios

I have this JSON response that I can't figure out how to map. It looks like this:
{
"responseError": null,
"displayMenuList": {
"MenuList": [
{
"ID": "3223",
"Name": "Main",
"AddressURL": "www.mysite.com",
"DisplayType": "True",
"ImageURL": "main.png",
"NotSplitBUser": "True",
"ParentCategoryId": "3223",
"PrivateUser": "True",
"SortOrder": 1,
"SplitBUser": "True",
"TargetURL": "_self"
},
{
"ID": "3307",
"Name": "Contact",
"AddressURL": "www.mysite.com",
"DisplayType": "True",
"ImageURL": "service.png",
"NotSplitBUser": "True",
"ParentCategoryId": "3224",
"PrivateUser": "True",
"SortOrder": 0,
"SplitBUser": "True",
"TargetURL": "_self"
},
{
"ID": "3298",
"Name": "Call Us",
"AddressURL": "www.mysite.com",
"DisplayType": "True",
"ImageURL": "service.png",
"NotSplitBUser": "True",
"ParentCategoryId": "3224",
"PrivateUser": "True",
"SortOrder": 1,
"SplitBUser": "True",
"TargetURL": "_self"
},
{
"ID": "3224",
"Name": "Service",
"AddressURL": "www.mysite.com",
"DisplayType": "True",
"ImageURL": "service.png",
"NotSplitBUser": "True",
"ParentCategoryId": "3224",
"PrivateUser": "True",
"SortOrder": 2,
"SplitBUser": "True",
"TargetURL": "_self"
}
]
},
"responseCurrentBillState": null,
"responseGetPcrfSubBuckets": null,
"userData": {
"abroadInd": null,
"accountType": "B",
"customerId": "",
"fullName": "Juan",
"subscriberNumber": ""
}
}
I just can't figure out how to map those objects, I've created object called RKSideMenu, also an object called RKUserData they look like this:
#interface RKSideMenu : NSObject
#property (copy, nonatomic) NSString *addressURL;
#property (copy, nonatomic) NSString *displayType;
#property (copy, nonatomic) NSNumber *id_number;
#property (copy, nonatomic) NSString *imageURL;
#property (copy, nonatomic) NSString *name;
#property (assign, nonatomic) BOOL splitBUser;
+ (NSDictionary*)getAttributes;
#end
#implementation RKSideMenu
+ (NSDictionary*)getAttributes
{
return [NSDictionary dictionaryWithObjects:#[#"addressURL", #"displayType", #"id_number", #"imageURL", #"name", #"splitBUser"]
forKeys:#[#"AddressURL", #"DisplayType", #"ID", #"ImageURL", #"Name", #"SplitBUser"]];
}
#end
#interface RKUserData : NSObject
#property (copy, nonatomic) NSString *abroadInd;
#property (copy, nonatomic) NSString *accountType;
#property (copy, nonatomic) NSString *customerID;
#property (copy, nonatomic) NSString *fullName;
#property (copy, nonatomic) NSString *subscriberNumber;
+ (NSDictionary*)getAttributes;
#end
#implementation RKUserData
+ (NSDictionary*)getAttributes
{
return [NSDictionary dictionaryWithObjects:#[#"abroadInd", #"accountType", #"customerID", #"fullName;", #"subscriberNumber"]
forKeys:#[#"abroadInd", #"accountType", #"customerId", #"fullName;", #"subscriberNumber"]];
}
#end
I started mapping with those two methods, but than I stuck and don't know what to do. I look at https://github.com/RestKit/RestKit/wiki/Object-mapping, but still couldn't get it right.
RKObjectMapping *sideMenuMapping = [RKObjectMapping mappingForClass:[RKSideMenu class]];
[sideMenuMapping addAttributeMappingsFromDictionary:[RKSideMenu getAttributes]];
RKObjectMapping *userDataMapping = [RKObjectMapping mappingForClass:[RKUserData class]];
[userDataMapping addAttributeMappingsFromDictionary:[RKUserData getAttributes]];
Thanks in advance!
Edit: Json on top replaced with real json from server.

So what you need to do in order to setup your mapping is first of all define the base url of your API, like so:
AFHTTPClient *client = [AFHTTPClient clientWithBaseURL:[NSURL URLWithString:#"URL_TO_YOUR_API"]];
RKObjectManager *objectManager = [[RKObjectManager alloc] initWithHTTPClient:client];
Then you need to set a response descriptor for the url that outputs the json above:
[[RKObjectManager sharedManager] addResponseDescriptor:[RKResponseDescriptor responseDescriptorWithMapping:sideMenuMapping
method:RKRequestMethodAny
pathPattern:#"/mainScreenData"
keyPath:#"displayMenuList.MenuList"
statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)]];
"RKRequestMethodAny" should be replaced by the Request Method you are using e.g. "RKRequestMethodGET".
Then you just retrieve the objects by calling:
[[RKObjectManager sharedManager] getObjectsAtPath:#"/mainScreenData"
parameters:nil
success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
NSArray *sideMenuList = [NSMutableArray arrayWithArray:[mappingResult array]];
}
failure:^(RKObjectRequestOperation *operation, NSError *error) {
NSLog(#"%#",[error localizedDescription]);
}];
I would highly recommend you having a look at the demos that are supplied by RestKit. That makes the whole process a lot clearer.
Cheers,
Sebastian

Related

Unable to map nested array json with restkit

How can i map this json
{
"json": [{
"json_department": [{
"department": {
"id": 1,
"inst_id": 1,
"dept_name": "Department",
"description": "test"
},
"needDelete": true
}],
"json_subjects": [{
"subjects": [{
"id": 1,
"department_id": 1,
"subject_name": "Sub 1"
}, {
"id": 2,
"department_id": 1,
"subject_name": "Sub 2"
}],
"needDelete": true
}]
}]
}
#interface class_department : NSObject
#property(nonatomic, assign) NSInteger dept_id;
#property(nonatomic, assign) NSInteger inst_id;
#property(nonatomic, strong) NSString *dept_name;
#property(nonatomic, strong) NSString *description_;
#end
_
#interface class_department_list : NSObject
#property(nonatomic, strong) class_department *department;
#property(nonatomic, assign) BOOL needDelete;
#end
-
#interface sync_json : NSObject
#property(nonatomic, strong) NSMutableArray *json_department;
#property(nonatomic, strong) NSMutableArray *json_subjects;
#end
-
-(RKResponseDescriptor *)getResponseDescriptor
{
RKObjectMapping *class_department_mapping = [RKObjectMapping mappingForClass:[class_department class]];
[class_department_mapping addAttributeMappingsFromDictionary:#{
#"id":#"dept_id",
#"inst_id":#"inst_id",
#"dept_name":#"dept_name"
#"description":#"description_",
}];
RKObjectMapping *class_department_list_mapping = [RKObjectMapping mappingForClass:[class_department_list class]];
[class_department_list_mapping addAttributeMappingsFromDictionary:#{
#"needDelete":#"needDelete"
}];
[class_department_list_mapping addPropertyMapping:[RKRelationshipMapping
relationshipMappingFromKeyPath:#"json_department.department"
toKeyPath:#"department"
withMapping:class_department_mapping]];
RKObjectMapping *json_mapping = [RKObjectMapping mappingForClass:[sync_json class]];
[json_mapping addPropertyMapping:[RKRelationshipMapping
relationshipMappingFromKeyPath:#"json_department"
toKeyPath:#"json_department"
withMapping:class_department_list_mapping]];
NSIndexSet *statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful);
RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:json_mapping
method:RKRequestMethodGET
pathPattern:nil
keyPath:#"json"
statusCodes:statusCodes];
return responseDescriptor;
}
OKay this is code i'm using for mapping the json. i got the result for 'needDelete' but mapping to class_department is not happen. Please give me a way to done this.
Thank you.
Shinurag KR
Sorry, but try to forget this ugly implementation. Mantle do everythig pretty easy for you. Project: https://github.com/Mantle/Mantle Example: http://www.objc.at/mantle

Restkit nested Object mapping issue

I am trying to populate two core data entities by using the following json structure.
{
"fldrs": [
{
"FldName": "Messages",
"FldID": "Messages",
"PrntFldID": null,
"UnRdCunt": "0",
"Cunt": "0",
"IsDflt": "True",
"FldIconID": null,
"SubFldrs": [
{
"FldName": "Compose",
"FldID": "INDV9",
"PrntFldID": "Messages",
"UnRdCunt": "0",
"Cunt": "0",
"IsDflt": "False",
"FldIconID": null,
"SubFldrs": null,
"tasksLists": null
},
{
"FldName": "Inbox",
"FldID": "INDV10",
"PrntFldID": "Messages",
"UnRdCunt": "2",
"Cunt": "12",
"IsDflt": "True",
"FldIconID": null,
"SubFldrs": null,
"tasksLists": null
}
],
"tasksLists": null
},
{
"FldName": "My Tasks",
"FldID": "My Tasks",
"PrntFldID": null,
"UnRdCunt": "0",
"Cunt": "0",
"IsDflt": "False",
"FldIconID": null,
"SubFldrs": [
{
"FldName": "Pending",
"FldID": "INDV1",
"PrntFldID": "My Tasks",
"UnRdCunt": "9",
"Cunt": "9",
"IsDflt": "False",
"FldIconID": null,
"SubFldrs": null,
"tasksLists": null
}
],
"tasksLists": null
}
]
}
Here 'SubFldrs' are the child entity of 'flds'.
Here is data model I am using
And the following are the model classes using
#class ParentFolder;
#interface SubFolder : NSManagedObject
#property (nonatomic, retain) NSString * fldId;
#property (nonatomic, retain) NSString * fldName;
#property (nonatomic, retain) NSString * isDefault;
#property (nonatomic, retain) NSString * msgCount;
#property (nonatomic, retain) NSString * prntFolderId;
#property (nonatomic, retain) NSString * unreadCount;
#property (nonatomic, retain) ParentFolder *subFolder_folder;
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#class SubFolder;
#interface ParentFolder : NSManagedObject
#property (nonatomic, retain) NSString * fldId;
#property (nonatomic, retain) NSString * fldName;
#property (nonatomic, retain) NSSet *folder_SubFolder;
#end
#interface ParentFolder (CoreDataGeneratedAccessors)
- (void)addFolder_SubFolderObject:(SubFolder *)value;
- (void)removeFolder_SubFolderObject:(SubFolder *)value;
- (void)addFolder_SubFolder:(NSSet *)values;
- (void)removeFolder_SubFolder:(NSSet *)values;
#end
And the Restkit Mapping is done by following code
RKObjectMapping* subFolderMapping = [RKObjectMapping mappingForClass:[SubFolder class] ];
[subFolderMapping addAttributeMappingsFromDictionary:#{
#"FldName": #"fldName",
#"FldID": #"fldId",
#"IsDflt": #"isDefault",
#"UnRdCunt": #"unreadCount",
#"Cunt": #"msgCount",
#"PrntFldID": #"prntFolderId"
}];
RKObjectMapping* folderMapping = [RKObjectMapping mappingForClass:[ParentFolder class] ];
[folderMapping addAttributeMappingsFromDictionary:#{
#"FldID": #"fldId",
#"FldName": #"fldName"
}];
[folderMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:#"subFolder"
toKeyPath:#"SubFldrs"
withMapping:subFolderMapping]];
RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:folderMapping
method:RKRequestMethodGET
pathPattern:nil
keyPath:#"fldrs"
statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];
return responseDescriptor;
The parent entity (ParentFolder) is populating as required, but child entity (SubFolder) is always empty.
Can anyone please help me out?
Looks like you just have the keys in the wrong order when you create the relationship mapping:
[folderMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:#"SubFldrs"
toKeyPath:#"subFolder"
withMapping:subFolderMapping]];

RestKit mapping object without object class

I have this issue, that i'm mapping all object properly, but the properties that are inside the root object, for some reason I cannot map.
This is the JSON:
{
"responseError": null,
"responseIsRegisteredServices": {
"registeredToServiceAntiVirus": true,
"registeredToServiceCloud": true,
"registeredToServiceMusic": true,
"registeredToServiceSong": true,
"registeredToServiceTv": true
},
"responseRegisteredServicesCloud": null,
"responseRegisteredServicesMusic": [
{
"ID": null,
"Name": null,
"AlbumPic": "110_110.png",
"ArtistName": "Rihanna"
},
{
"ID": null,
"Name": null,
"AlbumPic": "110_110.png",
"ArtistName": "Rihanna"
},
{
"ID": null,
"Name": null,
"AlbumPic": "110_110.png",
"ArtistName": "Steve Angello"
}
]
}
This is the RegisteredServices class:
#interface RegisteredServices : NSObject
#property (nonatomic) ResponseError *responseError;
#property (nonatomic) NSNumber *registeredToServiceAntiVirus;
#property (nonatomic) NSNumber *registeredToServiceCloud;
#property (nonatomic) NSNumber *registeredToServiceMusic;
#property (nonatomic) NSNumber *registeredToServiceSong;
#property (nonatomic) NSNumber *registeredToServiceTv;
#property (nonatomic) CloudServices *responseRegisteredServicesCloud;
#property (nonatomic) NSArray *responseRegisteredServicesMusix;
#end
This is the 'CloudServices' class:
#interface CloudServices : NSObject
#property (nonatomic) NSString *capacityType;
#property (nonatomic) NSNumber *currentCapacity;
#property (nonatomic) NSString *lastBackupDate;
#property (nonatomic) NSNumber *percentage;
#property (nonatomic) NSNumber *totalCapacity;
#end
This is the 'MusicServices' class:
#interface MusicServices : NSObject
#property (nonatomic) NSNumber *idNum;
#property (nonatomic) NSString *name;
#property (nonatomic) NSString *albumPic;
#property (nonatomic) NSString *artistName;
#end
This is the mapping itself:
RKObjectMapping *musixMapping = [RKObjectMapping mappingForClass:[MusicServices class]];
[musicMapping addAttributeMappingsFromDictionary:#{ #"ID" : #"idNum",
#"Name" : #"name",
#"AlbumPic" : #"albumPic",
#"ArtistName" : #"artistName" }];
RKObjectMapping *cloudMapping = [RKObjectMapping mappingForClass:[CloudServices class]];
[cloudMapping addAttributeMappingsFromDictionary:#{#"capacityType": #"capacityType",
#"currentCapacity": #"currentCapacity",
#"lastBackupDate": #"lastBackupDate",
#"percentage": #"percentage",
#"totalCapacity": #"totalCapacity" }];
RKObjectMapping *registeredServicesMapping = [RKObjectMapping mappingForClass:[RegisteredServices class]];
[registeredServicesMapping addAttributeMappingsFromDictionary:#{ #"registeredToServiceAntiVirus" : #"registeredToServiceAntiVirus",
#"registeredToServiceCloud" : #"registeredToServiceCloud",
#"registeredToServiceMusic" : #"registeredToServiceMusic",
#"registeredToServiceSong" : #"registeredToServiceSong",
#"registeredToServiceTv" : #"registeredToServiceTv", }];
[registeredServicesMapping addRelationshipMappingWithSourceKeyPath:#"responseRegisteredServicesMusic" mapping:musixMapping];
[registeredServicesMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:#"responseError"
toKeyPath:#"responseError"
withMapping:errorMapping]];
[registeredServicesMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:#"responseRegisteredServicesCloud"
toKeyPath:#"responseRegisteredServicesCloud"
withMapping:cloudMapping]];
[[RKObjectManager sharedManager] addResponseDescriptor:[RKResponseDescriptor responseDescriptorWithMapping:registeredServicesMapping
method:RKRequestMethodGET
pathPattern:#"registeredServices"
keyPath:nil
statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)]];
Can't figure out what seems to be the problem. When I add responseIsRegisteredServices into the keyPath: of the RKResponseDescriptor than the MusicServices array is null.
Thanks in advance.
So i've found the answer, in this line:
[registeredServicesMapping addAttributeMappingsFromDictionary:#{ #"registeredToServiceAntiVirus" : #"registeredToServiceAntiVirus",
#"registeredToServiceCloud" : #"registeredToServiceCloud",
#"registeredToServiceMusic" : #"registeredToServiceMusic",
#"registeredToServiceSong" : #"registeredToServiceSong",
#"registeredToServiceTv" : #"registeredToServiceTv", }];
I needed to change it from registeredToServiceAntiVirus to responseIsRegisteredServices .registeredToServiceAntiVirus and than it worked perfectly. This is how it looks:
[registeredServicesMapping addAttributeMappingsFromDictionary:#{ #"responseIsRegisteredServices.registeredToServiceAntiVirus" : #"registeredToServiceAntiVirus",
#"responseIsRegisteredServices.registeredToServiceCloud" : #"registeredToServiceCloud",
#"responseIsRegisteredServices.registeredToServiceMusic" : #"registeredToServiceMusic",
#"responseIsRegisteredServices.registeredToServiceSong" : #"registeredToServiceSong",
#"responseIsRegisteredServices.registeredToServiceTv" : #"registeredToServiceTv", }];
Enjoy.

Object Mapping doesn't work with RESTKit Object Mapping

I'm doing a GET Request with RESTKit and when I do my object mapping, it doesn't work. However, it always says that it mapped one object in the mapping result, but I don't know what that is or how I can get it to map the rest of the objects. What exactly am I doing wrong to cause the mapping result to show up as one object mapped and how do I get it to map all the proper objects?
Here is the mapping result:
Mapping Result: (
"<Info: 0x9c91130>"
)
Here is my GET Request:
//RK Logging
RKLogConfigureByName("RestKit/Network", RKLogLevelTrace);
NSIndexSet *statusCodeSet = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful);
NSString *urlString = [NSString stringWithFormat:#"https://beta.stuff.com/"];
NSURL *url = [NSURL URLWithString:urlString];
//Object Mapping
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[Info class]];
[mapping addAttributeMappingsFromDictionary:#{#"name": #"name", #"id": #"strenuusID", #"location_specialties.address": #"address", #"location_specialties.state": #"state", #"location_specialties.zip": #"zipcode", #"location_specialties.address_lines": #"address_lines"}];
NSString *pathPatternString = [NSString stringWithFormat:#"stuff/%#/stuff2/%#/", moreresultsVCSobj.projectNumber, moreresultsVCSobj.doctorStuff];
//Response Descriptor
RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping
method:RKRequestMethodGET
pathPattern:pathPatternString
keyPath:#""
statusCodes:statusCodeSet];
RKObjectManager *manager = [RKObjectManager managerWithBaseURL:url];
[manager addResponseDescriptor:responseDescriptor];
[manager.HTTPClient setDefaultHeader:#"Auth-Token" value:moreresultsVCSobj.userAuthToken];
Info *info = [Info new];
[manager getObject:info path:pathPatternString parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult)
{
NSLog(#"Mapping Result: %#", mappingResult.array);
} failure:^(RKObjectRequestOperation *operation, NSError *error)
{
NSLog(#"Error: %#", error);
}];
Here is the JSON that I am parsing:
response.body=
{
"name": "Name, Generic N, DDS",
"id": 123456,
"npi": "1234567890",
"hospitality": false,
"groupiness": [
"Other"
],
"client_ids": null,
"has_comments": false,
"comment_count": 0,
"is_facility": false,
"location_specialties": [
{
"id": 123456,
"address_id": 454345,
"address": "1234 Rifle Rd",
"state": "Al",
"zip": "43543",
"address_lines": [
"1234 Rifle Rd",
"Generic Town, Al 43543",
"111-222- 3344"
],
"latitude": 21432234,
"longitude": 432432,
"is_validated": true,
"providers_at_address_count": 2,
"specialties": [
{
"name": "Dentists",
"plans": [
{
"name": "Plan name",
"lists_specialty": true
},
{
"name": "Plane name 2",
"lists_specialty": true
},
{
"name": "Plan name 3",
"lists_specialty": true
}
]
}
]
},
[
{
"id": 123456,
"address_id": 454345,
"address": "1234 Rifle Rd",
"state": "Al",
"zip": "43543",
"address_lines": [
"1234 Rifle Rd",
"Generic Town, Al 43543",
"111-222- 3344"
],
"latitude": 21432234,
"longitude": 432432,
"is_validated": true,
"providers_at_address_count": 2,
"specialties": [
{
"name": "Dentists",
"plans": [
{
"name": "Plan name",
"lists_specialty": true
},
{
"name": "Plane name 2",
"lists_specialty": true
},
{
"name": "Plan name 3",
"lists_specialty": true
}
]
}
]
},
"hospital_detail": null,
"tags": [
]
}
Edited: Here is my Info.h file. I tried checking the mappings other things like name but they still don't work.
#import <Foundation/Foundation.h>
#interface Info : NSObject
#property (nonatomic, copy) NSString *name;
#property (nonatomic, copy) NSString *strenuusID;
#property (nonatomic, copy) NSString *npi;
#property (nonatomic, copy) NSArray *specialty_search_groups;
#property (nonatomic, copy) NSArray *address_lines;
#property (nonatomic, copy) NSArray *address;
#property (nonatomic, copy) NSString *state;
#property (nonatomic, copy) NSString *zipcode;
#property (nonatomic, copy) NSString *planName;
#end
You get one result object because your JSON is a dictionary. Your mapping and response descriptor are written in terms of a single object.
This mapping:
#"location_specialties.address": #"address"
Won't work because location_specialties is an array so there is no way to access the address. Unless your destination is an array variable, then it could possibly work.
You need to check the contents of your Info object in detail and look for issues in your trace log. If you still have issues you need to give details on the Info object itself.

restkit propertyname not showing

I'm having problems when posting to my server. Every value is being parsed expect the property-names of my array aren't.
My server is expecting something like this:
{
"location": 2,
"_id": "517808546b496658c10209",
"products": [
{
"amount": 3,
"total": 6.6,
"name": "Coke",
"price": 2.2
},{
"amount": 1,
"total": 4.0,
"name": "Water",
"price": 2
}
]
}
but my client is sending this:
{
"location": 2,
"_id": "517808546b496658c10209",
"products": [
3,
6.6,
"Coke",
2.2,
1,
4.0,
"Water",
2
]
}
Product:
#property (nonatomic) NSNumber *_id;
#property (nonatomic, strong) NSString *name;
#property (nonatomic, strong) NSString *detail;
#property (nonatomic, assign) float price;
#property (nonatomic, strong) Category *category;
#property (nonatomic, assign) int amount;
#property (nonatomic, assign) float total;
my code:
RKObjectMapping *productMapping = [RKObjectMapping requestMapping];
[productMapping addAttributeMappingsFromDictionary:#{#"productId":#"_id",#"amount":#":amount",#"total":#"total",#"price":#"price",#"name":#"name"}];
RKObjectMapping *horecaMapping = [RKObjectMapping requestMapping];
[horecaMapping addAttributeMappingsFromDictionary:#{ #"Id": #"_Id",#"deliverySpotId":#"location"}];
[horecaMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:#"self.getBasketSet" toKeyPath:#"products" withMapping:productMapping]];
RKRequestDescriptor *requestDescriptor = [RKRequestDescriptor requestDescriptorWithMapping:horecaMapping objectClass:[Horeca class] rootKeyPath:nil];
[RKMIMETypeSerialization registerClass:[RKNSJSONSerialization class] forMIMEType:#"text/plain"];
RKObjectManager *manager = [RKObjectManager managerWithBaseURL:baseURL];
[manager addRequestDescriptor:requestDescriptor];
[manager postObject:sharedHoreca path:#"/orders" parameters:nil success:nil failure:nil];
--update 1--
I also tried to make an NSSET of my array but this still doesn't help me.
(nsarray to nsset restkit)
The self.getBasketSet key path is giving me pause -- what is that returning? If your sharedHoreca object returns an NSArray of objects responding to the key paths specified then it should do what you are expecting...

Resources