I’m getting results of a query from a TFS Api call that comes to the Shell in JSON format. Powershell then puts those results in a PScustomObject. I normally take those results and use them to perform an update to the service hosting the Json payload. The problem I sometimes have is that the resulting object is rather deep in terms of a nested JSon / object structure. Which leads me to my question.
Tfs item I’m working with: https://www.visualstudio.com/en-us/docs/integrate/api/rm/definitions
If I have a custom Object [pscustomobject] how can it tell what the deepest depth is so I can send that result to Invoke-webrequest -depth (deepest)