Я хочу преобразовать ниже JSON в карту. но это список.
{
"_embedded": {
"items": [
{
"order": 1,
"technical": {
"id": 1,
"_links": {
"self": {
"href": "/profile/api/v3/service/40/technical"
}
}
}
},
{
"order": 2,
"technical": {
"id": 1,
"_links": {
"self": {
"href": "/profile/api/v3/service/40/technical"
}
}
}
}
]
}
}
Ожидаемый формат:
{
"1": "/profile/api/v3/service/40/technical",
"2": "/profile/api/v3/service/40/technical"
}
Но я получаю :::
[
{
"1": "/profile/api/v3/service/40/technical"
},
{
"2": "/profile/api/v3/service/40/technical"
}
]
JQ Query :::
._embedded.items | map({(.order| tostring ) : .technical._links.self.href} )
Пожалуйста, помогите, спасибо заранее ..
Фрагмент кода - https://jqplay.org/s/cEzh5_LimP