我有一个以这种方式格式化的json:
{
"first_name": "Mario",
"last_name": "Bros",
"email": "mario.bros@mario.com",
}
{
"first_name": "Luigi",
"last_name": "Bros",
"email": "luigi.bros@mario.com",
}
我有这个输出
jq --compact-output 'select(.contact_type | contains("tecnico")) | {FirstName: .first_name},{LastName: .last_name},{Email: .email}'
{"FirstName":"Mario"}
{"LastName":"Bros"}
{"Email":"mario.bros@mario.com"}
{"FirstName":"Luigi"}
{"LastName":"Bros"}
{"Email":"luigi.bros@mario.com"}
我想和 Luigi 的空间马里奥分开。