Cookbook: Difference between revisions
Jump to navigation
Jump to search
Carandraug (talk | contribs) |
Carandraug (talk | contribs) (→Retrieve a field value from all entries in a struct array: strcmpi for indexing) |
||
Line 32: | Line 32: | ||
{cases(:).name} | {cases(:).name} | ||
You are also not limited to return all elements, you may use logical indexing from other fields to get values from others | You are also not limited to return all elements, you may use logical indexing from other fields to get values from the others: | ||
[cases([cases(:).age] > 34).contaminated] | [cases([cases(:).age] > 34).contaminated] ## return contaminated state from all cases older than 34 | ||
[cases(strcmp({cases(:).protein}, "CDK2").tube] ## return all tube numbers with protein CDK2 | |||
== Input/output == | == Input/output == |