def avg: add / length; group_by(.url) | map({ "url": .[0].url, "hits": length, "avg": map(.response_time) | avg })