If I have a hash table like..
$theHash = @{"dog"="mean"; "cat"="nice";"bird"="annoying"}
I can get the key for a value by doing:
$theHash."dog"
How do I do the reverse? I want to put in something like, "mean" and get "dog" as the output? So if I only know "mean", how do I get dog from that?
$theHash.keys | Where-Object {$theHash["$_"] -eq 'mean'}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.