Hacker News new | ask | show | jobs
by ramchip 5088 days ago
Doesn't work on Windows ;)
2 comments

Sure it does. Install cygwin. (Or something else like that.) No serious computer user should be without a good shell. Powershell may be fine, too. There's probably some way to convince it to understand the JSON as a native object.

    $wc = New-Object "System.Net.WebClient"
    $airports = @("JFK", "GEO", "TXL", "SXF", "AGA", "LGW", "LTN", "SAW", "IKA", "KUL", "PER", "BKK", "KBP")
    foreach($airport in $airports) {
        $wc.DownloadString("http://airportcode.riobard.com/airport/" + $airport + "?fmt=json")
    }