$path = "https://api.statuspage.io/v1/pages/$page_id/$endpoint"
$req = Invoke-WebRequest -Uri $path -Method GET
This request returns an array of objects (50+). I can see this by running a Write-Host $req
Problem is, when I try something like
foreach($i in $req) {
Write-Host $i
}
I am given the entire object. And similarly, if I run Write-Host $req.length I am given 1. What gives?
Additionally, there is no way to run something like
$global:res = ConvertFrom-Json $req
Because it's already being returned as a JSON