Is there a way to get an NSDictionary
back from the string created via its description
method?
Given this code:
NSDictionary *dictionary = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"value 1", @"value 2", nil] forKeys:[NSArray arrayWithObjects:@"key 1", @"key 2", nil]];
NSString *dictionaryString = [dictionary description];
NSLog(dictionaryString);
Which makes this output:
{
"key 1" = "value 1";
"key 2" = "value 2";
}
Is there an easy way to go back from the string to an NSDictionary?