开发者

New NSMutableDictionary with value from other NSMutableDictionary

I have an NSMutableDictionary with the following values

itemDictionary: {
    div = "Photo";
    id = "http://www.myurl.com/images/photo.php?category=images";
    summary = "Cool pictures";
    title = "开发者_如何学编程Photographs";
    updated = Z;
}

What is the best way to Create a new dictionary with just the id value.

I will be grateful for any help.


This solution seems pretty clear:

[NSDictionary dictionaryWithObject:[itemDictionary objectForKey:@"id"] forKey:@"id"]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜