1

I am traversing an object and would like to replace several path parts with a string stored in another variable. For example:

# a is a complex ps object, the path is valid
$a.b.c 
myvalue

$replace = "b.c"
$a.$($replace)
# here I expect 'myvalue', however nothing is returned, as I would like to execute the equivalent of $a.b.c 

Is there some way to do this replacement?

Papi Abi
  • 173
  • 1
  • 10

0 Answers0