Code: Select all
$my1997keys = Array.new()
foreach $key, value in $myhash
if $value.find('1997')
$my1997keys.push $key
end
end
Also I am using .find to do the comparison. Nisus actually has a .containsString command which could be used instead. Not sure if there is any real advantage to one method or the other.
[PS: Sorry. Earlier I just wrote "foreach $key in $hash". But of course with hashes you have to do "foreach $key, $value in $hash".]