linux jq 命令之替换内容

    技术2023-08-13  66

    echo '{"hello":"world", "one":"two"}' | jq 'to_entries | map(if .key == "hello" then . + {"value":"WORLD"} elif .key == "one" then . + {"value":"three"} else . end ) | from_entries'
    Processed: 0.009, SQL: 9