{"id":16860619,"url":"https://github.com/moreati/jq-filter","last_synced_at":"2025-10-25T22:07:39.658Z","repository":{"id":45130955,"uuid":"169496957","full_name":"moreati/jq-filter","owner":"moreati","description":"Ansible filter plugin for jq filter expressions","archived":false,"fork":false,"pushed_at":"2024-08-16T20:37:25.000Z","size":11,"stargazers_count":22,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-13T22:12:47.919Z","etag":null,"topics":["ansible","ansible-collection","ansible-filter","jq"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/moreati/jq","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moreati.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-02-07T00:13:12.000Z","updated_at":"2025-01-21T21:58:52.000Z","dependencies_parsed_at":"2025-04-11T08:56:05.661Z","dependency_job_id":"68b316fb-1748-48fc-b727-1c36092c5557","html_url":"https://github.com/moreati/jq-filter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/moreati/jq-filter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moreati%2Fjq-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moreati%2Fjq-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moreati%2Fjq-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moreati%2Fjq-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moreati","download_url":"https://codeload.github.com/moreati/jq-filter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moreati%2Fjq-filter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281026266,"owners_count":26431762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-collection","ansible-filter","jq"],"created_at":"2024-10-13T14:25:44.108Z","updated_at":"2025-10-25T22:07:39.626Z","avatar_url":"https://github.com/moreati.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\njq-filter\n=========\n\nThis Ansible collection provides `jq()`, a filter that slices and dices JSON\njust like the [jq] command. It's particularly good with deeply nested lists\nof dicts, and dicts of lists.\n\nExample\n-------\n\nA list of databases \u0026 nested users such as\n\n```yaml\ndatabases:\n  - {name: db1, users: [{username: alice}, {username: alex}]}\n  - {name: db2, users: [{username: bob}, {username: brienne}]}\n```\n\ncan be transformed by a template expression such as\n\n```jinja\n{{ databases | moreati.jq.jq('map({db: .name, user: .users[].username}) }}\n\n```\n\ninto a flat list\n\n```\n[\n  {\"db\": \"db1\", \"user\": \"alice\"},\n  {\"db\": \"db1\", \"user\": \"alex\"},\n  {\"db\": \"db2\", \"user\": \"bob\"},\n  {\"db\": \"db2\", \"user\": \"brienne\"}\n]\n```\n\nYou can try out jq expressions at [jqplay.org], starting with this [example].\n\n[jq]: https://stedolan.github.io/jq/\n[jq expression language]: https://stedolan.github.io/jq/manual/#Basicfilters\n[jqplay.org]: https://jqplay.org\n[example]: https://jqplay.org/s/zg_l3ZoT6C\n\nInstallation\n------------\n\nTo install this collection run\n\n```\nansible-galaxy collection install moreati.jq\n```\n\nRequirements\n------------\n\nThis collection requires\n\n- [Ansible] \u003e= 2.8\n- [Python jq] \u003e= 1.0\n\nTo install Python jq run\n\n```\npython -m pip jq\n```\n\nPython jq is only needed on the Ansible controller (the host your playbooks\nrun _from_). It's not needed on Ansible targets (hosts your playbooks run\n_against_). The `jq` command isn't needed.\n\npre-compiled wheels have been published for CPython 2.7, and 3.x on MacOS,\nand Linux (x86, x86_64). Other Python version, and pltforms will need to build\nthe module from source.\n\n[ansible]: https://ansible.com\n[Python jq]: https://pypi.org/project/jq\n\nRole Variables\n--------------\n\nNone.\n\nDependencies\n------------\n\nNo dependencies on other roles.\n\nExample Playbook\n----------------\n\n- [playbooks/demo.yml]\n\n[playbooks/demo.yml]: https://github.com/moreati/jq-filter/blob/master/playbooks/demo.yml\nLicense\n-------\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoreati%2Fjq-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoreati%2Fjq-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoreati%2Fjq-filter/lists"}