我怎样才能生成NSMutableDictionary
以下格式:
{
sitedetails = {
currency;
ere = {
price = {
test = {
gte = 100;
};
};
};
};
}
sitedetails
是键,货币 ( NSString
) 和ere
(NSMutableDictionary
带有自己的对象) 是 this 的对象NSMutableDictionary
。
NSMutableDictionary *dict1 = ;[NSMutableDictionary alloc] init];
[dict1 setObject:@"currency" forKey:@"sitedetails"];
NSMutableDictionary *dict2 = ;[NSMutableDictionary alloc] init];
[dict2 setObject:ereDict forKey:@"sitedetails"];
[dict1 addEntriesFromDictionary:dict2];
这不允许我在 for 中添加字符串值dict1
。知道我哪里出错了吗?
{
sitedetails = {
ere = {
price = {
test = {
gte = 100;
};
};
};
};
}