{"id":13583401,"url":"https://github.com/blgm/jfq","last_synced_at":"2025-03-17T07:31:38.028Z","repository":{"id":28689656,"uuid":"119084747","full_name":"blgm/jfq","owner":"blgm","description":"JSONata on the command line","archived":false,"fork":false,"pushed_at":"2023-12-18T14:14:39.000Z","size":3128,"stargazers_count":41,"open_issues_count":13,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-18T16:47:56.134Z","etag":null,"topics":["jq","json","jsonata"],"latest_commit_sha":null,"homepage":"http://jsonata.org/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blgm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-01-26T17:55:58.000Z","updated_at":"2023-12-20T15:34:36.092Z","dependencies_parsed_at":"2023-12-20T15:44:49.920Z","dependency_job_id":null,"html_url":"https://github.com/blgm/jfq","commit_stats":null,"previous_names":[],"tags_count":19,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blgm%2Fjfq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blgm%2Fjfq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blgm%2Fjfq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blgm%2Fjfq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blgm","download_url":"https://codeload.github.com/blgm/jfq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221673986,"owners_count":16861754,"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","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":["jq","json","jsonata"],"created_at":"2024-08-01T15:03:27.411Z","updated_at":"2024-10-27T12:14:32.448Z","avatar_url":"https://github.com/blgm.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/jfq.svg)](https://www.npmjs.com/package/jfq)\n[![test](https://github.com/blgm/jfq/workflows/test/badge.svg?branch=main)](https://github.com/blgm/jfq/actions?query=workflow%3Atest+branch%3Amain)\n\n# jfq\n[JSONata](http://jsonata.org/) on the command line.\n\nThis was inspired by the excellent [jq](https://stedolan.github.io/jq/) utility, and uses JSONata rather than the\n`jq` language.\n\n## Installation\n```\nnpm install --global jfq\n```\n\n## Usage\n```\njfq [options] [\u003cJSONata query\u003e] [\u003cfiles\u003e]\n```\n\nIt is good practice to put the JSONata query in single quotes, so that the shell does\nnot attempt to interpret it.\n\nThe output will formatted as JSON, unless it's an array of simple objects (e.g. string, number)\nwhen the output is flattened to a series of lines, so that it can be piped to another program such as `xargs`.\n\nOptions\n- `-n, --ndjson` output as newline-delimited JSON (each object on a single line)\n- `-j, --json` force output as JSON, when it would normally be flattened\n- `-y, --yaml` output as YAML\n- `-a, --accept-yaml` accept YAML input\n- `-q, --query-file \u003cpath\u003e` read JSONata query from a file\n\n## Examples\n- To read the version of JSONata from the file `package.json`:\n```\njfq 'dependencies.jsonata' package.json\n\n# ^1.5.0\n```\n\n- To find out how many downloads of JSONata there have been each month in the past year:\n```\ncurl -s \\\n  https://api.npmjs.org/downloads/range/last-year/jsonata \\\n  | jfq 'downloads{$substring(day, 0, 7): $sum(downloads)}'\n\n# {\n#  \"2017-02\": 36216,\n#  \"2017-03\": 46460,\n#  \"2017-04\": 40336,\n#  ...\n# }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblgm%2Fjfq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblgm%2Fjfq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblgm%2Fjfq/lists"}