【发布时间】:2012-12-20 18:16:48
【问题描述】:
可能重复:
Iterar over array of entity and get value of some key based on value of “other key” matche
如果状态字段不为空,谁能给我一个提示或提示,告诉我如何获取字典中所有salary 字段的值?我只想从字典中status != null 所在的那些对象中检索salary 字段。请注意,我的字典是动态的,这意味着我可能有四个以上的条目。非常感谢任何帮助或提示。提前谢谢你。
myArray=(
{
Name = "john1";
Address = "san diego";
Status = "active";
salary = "100;
},
{
Name = "steve ";
Address = "birmingham";
Status = "<null>";
salary = "100;
},
{
Name = "allan";
Address = "san diego";
Status = "active";
salary = "100;
},
{
Name = "peter";
Address = "san diego";
Status = "<null>";
salary = "100;
},
)
【问题讨论】:
标签: ios nsarray compare nsdictionary