Replying to self because I learned something new about PowerShell today :)
On the challenge github page dfinke used irm (Invoke-RestMethod) instead of iwr (Invoke-WebRequest).
It turns out that irm actually looks at the content type of the response and converts from json to objects implicitly if the content type indicates json.
Thanks to dfinke.
The above PowerShell one-liner can thus be written shorter (omitting the explicit ConvertFrom-Json invokation):
On the challenge github page dfinke used irm (Invoke-RestMethod) instead of iwr (Invoke-WebRequest).
It turns out that irm actually looks at the content type of the response and converts from json to objects implicitly if the content type indicates json.
Thanks to dfinke.
The above PowerShell one-liner can thus be written shorter (omitting the explicit ConvertFrom-Json invokation):