top | item 45395773

(no title)

hn-ifs | 5 months ago

Now I'm on the computer this is the Nushell variant, you could probably do something with reduce too:

    ~> http get https://api.weather.gov/gridpoints/BOU/63,62/forecast 
       | from json 
       | get properties.periods.temperature 
       | {average: ($in | math avg) minimum: ($in | math min) maximum: ($in | math max)}
    ╭─────────┬───────╮
    │ average │ 66.36 │
    │ minimum │ 52    │
    │ maximum │ 81    │
    ╰─────────┴───────╯
    ~>

discuss

order

No comments yet.