{"id":21214479,"url":"https://github.com/slice/json","last_synced_at":"2026-05-17T21:03:06.515Z","repository":{"id":83250346,"uuid":"140745841","full_name":"slice/json","owner":"slice","description":"A tiny Node.js CLI script to access JSON from stdin.","archived":false,"fork":false,"pushed_at":"2018-07-12T18:41:27.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T16:24:01.230Z","etag":null,"topics":["json","json-cli"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/slice.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}},"created_at":"2018-07-12T17:39:38.000Z","updated_at":"2018-07-12T18:41:28.000Z","dependencies_parsed_at":"2023-03-01T02:45:53.536Z","dependency_job_id":null,"html_url":"https://github.com/slice/json","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slice","download_url":"https://codeload.github.com/slice/json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243663739,"owners_count":20327339,"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":["json","json-cli"],"created_at":"2024-11-20T21:28:07.183Z","updated_at":"2026-05-17T21:03:06.414Z","avatar_url":"https://github.com/slice.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json\n\na tiny utility for working with json from stdin\n\n## installation\n\nrequires node 8+.\n\n```sh\n$ npm i -g @slicey/json\n```\n\n## usage\n\noutput is prettified for complex structures, and is not shortened. it is also\ncolored if stdout is a tty :)\n\n```sh\n# access from stdin:\n\n$ curl -s https://httpbin.org/headers | json headers.User-Agent\n'curl/7.54.0'\n\n$ cat file.json | json mystery.fortune\n'👀'\n\n# arrays work:\n\n$ echo '[1, 2, 3]' | json 0\n1\n\n# and so do objects:\n\n$ echo '{ \"hello there\": \"warm goodness\" }' | json 'hello there'\n'warm goodness'\n\n# get you a shibe:\n\n$ curl -s shibe.online/api/shibes | json 0 | xargs open # macOS\n$ curl -s shibe.online/api/shibes | json 0 | xargs xdg-open # Linux\n\n# direct file access? no prob:\n\n$ json package.json bin.json\n'bin/json'\n\n$ json file.json subobject.another_subobject.subarray.2\n'wow this is inside of an array'\n\n# pretty printing too!\n\n$ json package.json\n{\n  name: '@slicey/json',\n  description: 'Quickly access JSON from stdin.',\n...\n\n# works with stdin also:\n\n$ cat mysteries.json | json\n[\n  {\n    created_at: '2009-01-05',\n    text: 'Where\\'s my Cup Noodles?'\n  },\n  {\n    created_at: '2009-01-06',\n    text: 'My Cup Noodles have arms?'\n  }\n...\n```\n\n## motivation\n\nbored on a thursday\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslice%2Fjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslice%2Fjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslice%2Fjson/lists"}