Alternative to invoke-expression

Occasional Contributor

I am looking for alternate way to extract the value of the below powershell object without using invoke-expression


invoke-expression "`$$subprop"


invoke-expression "`$abc.$subprop1"



$abc is a powershell object in JSON format

$subprop is having one of the Noteproperties of '$'


1 Reply
If the expression is a script cmdlet & $variable format might have worked. But in this case, it is not working.