Possible Duplicate:
Iterar over array of entity and get value of some key based on value of “other key” matche
Please, can anyone give me a hint or tip on how I can get the value of all the salary
fields in my dictionary, if the status field is not null? I only want to retrieve the salary
field from those objects in the dictionary where status != null
. Note that my dictionary is dynamic, meaning I may have mor than four entries. Any help or hints highly appreciated. Thank you in advance.
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;
},
)