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?

1
  • 1
    hope the linked answers helps Commented Dec 13, 2022 at 0:15

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.