I would like to assign each item from a dictionary into my object using a “for…in” loop
I have a NSDictionary like that :
{"user_id" : "1", "user_name" : "John"}
And I have an NSObject with variable :
NSString *user_id;
NSString *user_name
With a for in loop, I want to assign each item from my NSDictionary in my NSObject
for (NSString *param in userDictionary) {
}
How I can do that ?
Thanks,
Have a look at the NSObject class method:
For example: