$GasStations = (Invoke-WebRequest -Uri "https://api.e-control.at/sprit/1.0/search/gas-stations/by-address?latitude=48.2505077&longitude=16.4019153&fuelType=SUP&includeClosed=false" -ContentType application/json).Content | ConvertFrom-Json | Where-Object { $_.Prices -ne $null } | Select-Object Name, Location, distance, prices
foreach ($GasStation in $GasStations) { [PSCustomObject]@{ Name = $GasStation.Name Location = $GasStation.Location.address "Distance(km)" = [System.Math]::Round($GasStation.Distance, 2) Price = $GasStation.prices.amount } }