我有一本字典,比如:
{
"Items": [
{
"ID": "123abc",
"Name": "test name",
"Description": "item 1"
},
{
"ID": "321zyx",
"Name": "test name two",
"Description": "item 2"
}
]
}
我想用
jq
将其转换为:
{
"123abc": {
"Name": "test name",
"Description": "item 1"
},
"321zyx": {
"Name": "test name two",
"Description": "item 2"
}
}
这可能吗?如果是这样,我将如何实现这一目标?