I'm studying Hash Tables in PowerShell at the moment and I learned that variables can be used as both keys and values. I had already created a hash table by this point and wanted to see how I could nest that within another hash table. So, here's the information for what I'm doing:
I created a hash table named $avatar. Within this are the keys "Episode 1", "Episode 2", "Episode 3", etc. along with the name of each episode as the value.
$avatar = [ordered]@{
"Episode 1" = "The Boy in the Iceberg";
"Episode 2" = "The Avatar Returns";
"Episode 3" = "The Southern Air Temple";
}
So then I wanted to put this hash table within another with the name $shows.
$shows = [ordered]@{
"Avatar" = $avatar;
}
So, here's my question. Did I write the syntax for nesting the hash table correctly? If not, how should it be written? Also, what is the syntax required for calling a specific key from the nested hash table?