Building a list from complex YAML

Hi Guys need some advice on this case

here’s my hostvars

look like i’ve the proper json_query

  • debug: msg=“{{ item }}”
    with_items:
  • “{{ SERVICE.MC|json_query(‘*.PIM_GROUP’) }}”

which gives

“msg”: [
“GS_SIGMAX_MC_A_PIM”,
“GS_SIGMAY_MC_A_PIM”
]