Hi @Dick Visser,

That gives the below output.

-----------------%<-----------------

TASK [debug] *******************************************************************
ok: [localhost] => {
    "results|json_query('[].status.ActiveState')": ""
}

-----------------%<-----------------


Thanks

---
Lee

On Tue, Dec 28, 2021 at 1:37 AM Dick Visser <[email protected]> wrote:
>
> On Mon, 27 Dec 2021 at 07:32, Thomas Stephen Lee <[email protected]> wrote:
>
> >   - debug:
> >       msg: "{{ hello.results | to_nice_json |
> > json_query('status.ActiveState') }}"
>
> the result var is a list, so if you want a list of a specific key:
>
>
> - debug: var=results|json_query('[].status.ActiveState')
>
>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwNzq_4RhS4rtsTxHhWbPq8SRBMM3_1hpV30mHMFyp6sFA%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAG7s96VGmsZ8OEhoNFtuEr4q1dmrK0pd6pKGpsspwCi4WQgjxg%40mail.gmail.com.

Reply via email to