I've got a hash table:
$myHash = @{
"key1" = @{
"Entry 1" = "one"
"Entry 2" = "two"
}
"key 2" = @{
"Entry 1" = "three"
"Entry 2" = "four"
}
}
I'm doing a loop through to get the objects:
$myHash.keys | ForEach-Object {
Write-Host $_["Entry 1"]
}
Works fine, but what can I use to figure out which of the keys of $myHash I'm in? $_.Name doesn't return anything. I'm stumped. Help?