LoginSignup
6
4

More than 5 years have passed since last update.

巨大な JSON の中の Item の配列を 1行ずつの JSON にする方法

Last updated at Posted at 2016-01-22
{
    "Hoge": 100, 
    "Fuge": 100, 
    "Rows": [
        {
            "a": 1234,
            "b": 5678
        }, 
        {
            "a": 2345,
            "b": 6789
        }
    ],
    "Hoga": 100
}

みたいで Rows が巨大な JSON があったとして、

{"a":1234,"b":5678}
{"a":2345,"b":6789}

としたいとする。こうすれば 1 行ずつ処理できるので便利だ。

hoge.json| jq -c '.["Rows"][]' 

で OK。

6
4
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4