如何将最后一列的数字四舍五入到小数点后两位?
我有json:
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 9,
"successful": 9,
"failed": 0
},
"hits": {
"total": 2,
"max_score": 2.575364,
"hits": [
{
"_index": "my-2017-08",
"_type": "log",
"_id": "AV5V8l0oDDWj-VP3YnCw",
"_score": 2.575364,
"_source": {
"acb": {
"version": 1,
"id": "7",
"owner": "pc",
"item": {
"name": "Account Average Latency",
"short_name": "Generate",
"description": "Generate of last month"
},
"service": "gsm"
},
"@timestamp": "2017-07-31T22:00:00.000Z",
"value": 210.08691986891395
}
},
{
"_index": "my-2017-08",
"_type": "log",
"_id": "AV5V8lbE28ShqBNuBl60",
"_score": 2.575364,
"_source": {
"acb": {
"version": …Run Code Online (Sandbox Code Playgroud) jq 中的 round 函数不起作用。
$ jq '10.01 | round'
jq: error: round/0 is not defined at <top-level>, line 1:
10.01 | round
jq: 1 compile error
$ jq --help
jq - commandline JSON processor [version 1.5-1-a5b5cbe]
Run Code Online (Sandbox Code Playgroud)
我需要做什么?