Я хочу выбрать родительское значение, где результат поля с определенным значением
Вот json, который у меня есть:
{
"lde-poc-01": {
"file_|-linux-debian-login-uidmin_|-/etc/login.defs_|-replace": {
"name": "/etc/login.defs",
"changes": {},
"pchanges": {},
"result": true,
"comment": "No changes needed to be made",
"__sls__": "dev/linux/ubuntu/login",
"__run_num__": 0,
"start_time": "14:40:20.708675",
"duration": 17.447,
"__id__": "linux-debian-login-uidmin"
},
"file_|-linux-debian-login-uidmax_|-/etc/login.defs_|-replace": {
"name": "/etc/login.defs",
"changes": {},
"pchanges": {},
"result": true,
"comment": "No changes needed to be made",
"__sls__": "dev/linux/ubuntu/login",
"__run_num__": 1,
"start_time": "14:40:20.726336",
"duration": 10.614,
"__id__": "linux-debian-login-uidmax"
},
"file_|-linux-debian-login-sysuidmax_|-/etc/login.defs_|-replace": {
"name": "/etc/login.defs",
"changes": {},
"pchanges": {},
"result": true,
"comment": "No changes needed to be made",
"__sls__": "dev/linux/ubuntu/login",
"__run_num__": 2,
"start_time": "14:40:20.737165",
"duration": 10.515,
"__id__": "linux-debian-login-sysuidmax"
},
"file_|-linux-debian-login-gidmin_|-/etc/login.defs_|-replace": {
"name": "/etc/login.defs",
"changes": {},
"pchanges": {},
"result": true,
"comment": "No changes needed to be made",
"__sls__": "dev/linux/ubuntu/login",
"__run_num__": 3,
"start_time": "14:40:20.747892",
"duration": 10.201,
"__id__": "linux-debian-login-gidmin"
},
"file_|-linux-ubuntu-docker_|-/etc/apt/sources.list.d/docker.list_|-managed": {
"changes": {},
"pchanges": {},
"comment": "File /etc/apt/sources.list.d/docker.list is in the correct state",
"name": "/etc/apt/sources.list.d/docker.list",
"result": true,
"__sls__": "dev/linux/ubuntu/apt",
"__run_num__": 9,
"start_time": "14:40:20.873513",
"duration": 40.569,
"__id__": "linux-ubuntu-docker"
},
"cmd_|-linux-ubuntu-unattended-updrade-service_|-systemctl daemon-reload_|-run": {
"changes": {},
"result": false,
"duration": 0.008,
"start_time": "14:40:21.159608",
"comment": "State was not run because none of the onchanges reqs changed",
"__state_ran__": false,
"__run_num__": 20,
"__sls__": "dev/linux/ubuntu/apt"
},
"file_|-linux-ubuntu-upgrade-script-telegraf_|-/etc/telegraf/check-update.sh_|-managed": {
"changes": {},
"pchanges": {},
"comment": "File /etc/telegraf/check-update.sh is in the correct state",
"name": "/etc/telegraf/check-update.sh",
"result": true,
"__sls__": "dev/linux/ubuntu/apt",
"__run_num__": 21,
"start_time": "14:40:21.159685",
"duration": 42.313,
"__id__": "linux-ubuntu-upgrade-script-telegraf"
},
"file_|-linux-ubuntu-upgrade-telegraf_|-/etc/telegraf/telegraf.d/update.conf_|-managed": {
"changes": {},
"pchanges": {},
"comment": "File /etc/telegraf/telegraf.d/update.conf is in the correct state",
"name": "/etc/telegraf/telegraf.d/update.conf",
"result": true,
"__sls__": "dev/linux/ubuntu/apt",
"__run_num__": 22,
"start_time": "14:40:21.202254",
"duration": 51.238,
"__id__": "linux-ubuntu-upgrade-telegraf"
},
"file_|-mysoc-po-python-rm2_|-/var/tmp/mysoc-po_|-absent": {
"name": "/var/tmp/mysoc-po",
"changes": {},
"pchanges": {},
"result": false,
"comment": "File /var/tmp/mysoc-po is not present",
"__sls__": "dev/mysoc-po",
"__run_num__": 236,
"start_time": "14:40:38.161788",
"duration": 0.305,
"__id__": "mysoc-po-python-rm2"
}
}
}
Я хочу получить значения комментария / идентификатора и родительское значение, например ("file_ | -mysoc-po-python-rm2_ | - / var / tmp / mysoc-po_ | -absent"), где результат поля ложь.
Я пытался использовать функцию выбора, но безуспешно
Спасибо за вашу помощь