cat 2.txt | ./jq '{(.id): .custom}'
上記のコマンド出力
{
"1": {
"results": "Success"
}
}
{
"2": {
"input method": "touch",
"from": "Prescription Center",
}
}
{
"3": {
"entry point": "|All"
}
}
期待される出力:
各オブジェクトを1行に印刷/保存したい。
cat 2.txt | ./jq '{(.id): .custom}'
{ "1": { "results": "Success" } }
{ "2": { "input method": "touch", "from": "Prescription Center" } }
{ "3": { "entry point": "|All" } }
シェルスクリプトで可能ですか?