Merge json files using jq (one input object per file -> one larger output object, not a list)

前端 未结 1 869
轮回少年
轮回少年 2021-01-28 06:42

I am merging two json files using \"jq -s . file1 file2\", but I want them to get merged without comma separation. Also it shouldn\'t start with []

file 1:

1条回答
  •  暖寄归人
    2021-01-28 07:07

    One option slong the lines of your attempt:

    jq -s add file1 file2
    

    Another:

       jq -n 'input+input' file1 file2
    

    0 讨论(0)
提交回复
热议问题