I'm using JSONModel for working with a JSON Api and now got stuck on parsing a Dictionary of Dictionaries.
{
"locations": {
"one": {
"displayName": "Name One",
"description": "Description One"
},
"two": {
"displayName": "Name Two",
"description": "Description Two"
}
}
}
In my example, I need the keys "one" and "two" and their content so I thought about something like this
@protocol BaseDataModel;
@interface BaseDataModel : JSONModel
@property (nonatomic) NSDictionary<NSString *, LocationModel> *locations;
@end
But this won't work because LocationModel
isn't a Objective-C Type.