Hacker News new | ask | show | jobs
by bonzini 1679 days ago
You can write the example below in jq as

    def avg: add / length;
    group_by(.url) | map({
      "url": .[0].url,
      "hits": length, 
      "avg": map(.response_time) | avg
    })
so jq should be (at least roughly) as powerful as JSONiq.