I am new to Powershell and is currently facing this problem.
I call a REST API in Powershell which stores the API response in $GetResponse variable. Hereby some display statements:-
Write-Host $Getresponse.GetType()
Output :- System.Management.Automation.PSCustomObject
Write-Host $Getresponse.registered_models.name
Output :- test test1
Write-Host $Getresponse | Get-Member -Force
Output:- @{registered_models=System.Object[]}
I want to store the output of $Getresponse into an array variable but couldn't figure out a way to do it.