I have an object that looks like this.
$test = {
"displayName": "Testname"
"userAge": 22
}
I have an array that looks like this.
$friendlyNames = ["Display name", "User age"]
The way this is set up the $friendlyNames array index will always match with the object property order. Is it possible to automatically replace this and end up with a object that looks like this?
$test = {
"Display name" = "Testname"
"User age" = 22
}
Select-Objectwith calculated properties. ///// however, you should avoid putting spaces or other "non-standard" chars in property or parameter names. it adds the [utterly needless] need to wrap those names in quotes to allow one to use them. ///// if at all possible, DO NOT cause yourself problems that way. [*grin]