我使用 Ansible 过滤器 json_query
数据:
[
"just_dir",
{
"path": "extend_dir",
"order": "nginx"
}
]
我想得到:
[
{
"path": "just_dir",
},
{
"path": "extend_dir",
"order": "nginx"
}
]
merage([?type(@) == `string`].{path: @}, [?type(@) == `object`])
不起作用。