I can't find the answer to the following question.
Code:
function Get-Sub([string]$select)
{
$var_string = '{"roles": {"categories": {"test": "111"}}}'
$psobject = $var_string | ConvertFrom-Json
$psobject.roles.categories | out-gridview -Title "Working"
$psobject.$select | out-gridview -Title "Not Working"
}
Get-Sub -select 'roles.categories'
How can i get the parameter selection to work?