Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Doesn't work on Windows ;)


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")
    }




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: