# Ansible alternative to jq select

**URL:** <https://forum.ansible.com/t/ansible-alternative-to-jq-select/22179>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [August 1, 2016, 8:46am UTC](https://forum.ansible.com/t/ansible-alternative-to-jq-select/22179 "2016-08-01T08:46:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenjis15](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@kenjis15](https://forum.ansible.com/u/kenjis15)\
**Post date:** [August 1, 2016, 8:46am UTC](https://forum.ansible.com/t/ansible-alternative-to-jq-select/22179/1 "2016-08-01T08:46:42Z")

</div>

Hi,

I have command like this which picks up an element from a list of AWS hosted zones if hosted zone named “testinternal” is found in the list. If it finds it, extracts Id filed from that element.

```auto
aws route53 list-hosted-zones | jq '.HostedZones[] | select(.Name == "testinternal.")' | jq -r ".Id"

```

```auto

```

```auto
Is there an alternative to this in Ansible ? 

```

```auto

```

```auto
If any, then I would like to use it in conjunction with route53_facts module so that I do not need to rely on jq command.

```
