{"id":15999582,"url":"https://github.com/kcmr/get-json-value","last_synced_at":"2026-04-29T17:31:54.882Z","repository":{"id":57250255,"uuid":"215619845","full_name":"kcmr/get-json-value","owner":"kcmr","description":"Command Line Tool that returns the value of a key path in one or multiple JSON files.","archived":false,"fork":false,"pushed_at":"2019-10-16T18:50:17.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T14:50:38.482Z","etag":null,"topics":["cli","json"],"latest_commit_sha":null,"homepage":null,"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/kcmr.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}},"created_at":"2019-10-16T18:43:58.000Z","updated_at":"2023-02-14T02:24:34.000Z","dependencies_parsed_at":"2022-08-24T16:51:53.853Z","dependency_job_id":null,"html_url":"https://github.com/kcmr/get-json-value","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fget-json-value","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fget-json-value/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fget-json-value/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fget-json-value/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kcmr","download_url":"https://codeload.github.com/kcmr/get-json-value/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271527,"owners_count":20911587,"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":["cli","json"],"created_at":"2024-10-08T09:00:24.562Z","updated_at":"2026-04-29T17:31:53.308Z","avatar_url":"https://github.com/kcmr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# get-json-value\n\n\u003e Command Line Tool that returns the value of a key path (`some.key.path`) in one or multiple JSON files.\n\n## Installation\n\n```sh\n$ npm i -g get-json-value\n```\n\n## Usage\n\nBy default it looks for JSON files in the current working directory. \n\n```sh\n$ get-json-value \u003cobject.key.path\u003e \u003cfile\u003e (optional file name)\n```\n\n## Examples\n\nExecuted in a directory with the following files and contents:\n\n```js\nlocales/\n|__es.json // {\"home\": {\"greeting\": \"Hola\"}}\n|__en.json // {\"home\": {\"greeting\": \"Hello\"}}\n```\n\nIt will output:\n\n```sh\n$ get-json-value home.greeting\n\nes Hola\nen Hello\n```\n\nPassing file name (without extension):\n\n```sh\n$ get-json-value home.greeting es\n\nes Hola\n```\n\n### Custom search directory\n\nYou can specify a custom search directory, for instance, for usage in npm-scripts, by setting the Node env variable `GJV_SEARCH_DIR`.\n\n```json\n\"scripts\": {\n  \"getvalue\": \"GJV_SEARCH_DIR=./path/to/something npx get-json-value\"\n}\n```\n\n```sh\n$ npm run getvalue some.path\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcmr%2Fget-json-value","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkcmr%2Fget-json-value","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcmr%2Fget-json-value/lists"}