Answer the question
In order to leave comments, you need to log in
How to implement search in a multilevel hash table?
Here is an example of such a table.
$aa = @{"key1" = @{"key2" = @{"key3" = @{"key4" = "value4"}}}}
Answer the question
In order to leave comments, you need to log in
Without support for arrays, I once wrote for myself such a recursive function
function Get-ObjectValue($Object, $PropertyName) {
$property, $remain = $PropertyName -split '\.',2
if ($remain) {
Get-ObjectValue $Object.$property $remain
}
else {
$Object.$property
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question