{"id":15767442,"url":"https://github.com/kikobeats/jsonsort","last_synced_at":"2025-05-12T20:46:21.439Z","repository":{"id":40268348,"uuid":"171483937","full_name":"Kikobeats/jsonsort","owner":"Kikobeats","description":"Sort an array of objects based on a criteria","archived":false,"fork":false,"pushed_at":"2024-09-07T08:00:30.000Z","size":74,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-03T01:22:06.753Z","etag":null,"topics":["cli","criteria","json","sort"],"latest_commit_sha":null,"homepage":"https://nicedoc.io/Kikobeats/jsonsort","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/Kikobeats.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-19T14:02:05.000Z","updated_at":"2024-04-21T19:14:51.000Z","dependencies_parsed_at":"2022-08-19T08:31:08.674Z","dependency_job_id":"961823b9-8cbf-4658-aa7d-b92fbf1328d3","html_url":"https://github.com/Kikobeats/jsonsort","commit_stats":{"total_commits":74,"total_committers":4,"mean_commits":18.5,"dds":"0.33783783783783783","last_synced_commit":"436d28d0b8fa4f321b36685a983946f1545052df"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fjsonsort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fjsonsort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fjsonsort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kikobeats%2Fjsonsort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kikobeats","download_url":"https://codeload.github.com/Kikobeats/jsonsort/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253818860,"owners_count":21969234,"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","criteria","json","sort"],"created_at":"2024-10-04T13:22:09.967Z","updated_at":"2025-05-12T20:46:21.423Z","avatar_url":"https://github.com/Kikobeats.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @kikobeats/jsonsort\n\n![Last version](https://img.shields.io/github/tag/Kikobeats/jsonsort.svg?style=flat-square)\n[![Build Status](https://img.shields.io/travis/Kikobeats/jsonsort/master.svg?style=flat-square)](https://travis-ci.org/Kikobeats/jsonsort)\n[![NPM Status](https://img.shields.io/npm/dm/@kikobeats/jsonsort.svg?style=flat-square)](https://www.npmjs.org/package/@kikobeats/jsonsort)\n\n\u003e Sort an object or a collection of objects based on a criteria.\n\n## Install\n\n```bash\n$ npm install @kikobeats/jsonsort --global\n```\n\n## CLI\n\n```bash\n$ jsonsort \u003cfile\u003e[flags]\n\nFlags\n  --criteria  Specify the criteria to sort. It can be a key name or fat arrow function.\n  --quiet     Avoid print output\n  --save      Write the output back. If a path is specified, it will be used over the original\n\nExamples\n  $ jsonsort file.json # Just output a sorted json\n  $ jsonsort file.json --criteria name # Sort an array of objects based on alphabetical `name` value.\n  $ jsonsort file.json --criteria 'x =\u003e x.featured' # Passing a function as criteria.\n  $ jsonsort file.json --criteria name --save # Sort and save the result.\n  $ jsonsort file.json --criteria name --save # Sort, save but dont print result.\n\n```\n\nIt's easy to complement with others UNIX commands, like `jq`:\n\n```bash\njq .redirects now.json | jsonsort --criteria source\n```\n\n## License\n\n**jsonsort** © [Kiko Beats](https://kikobeats.com), released under the [MIT](https://github.com/Kikobeats/jsonsort/blob/master/LICENSE.md) License.\u003cbr\u003e\nAuthored and maintained by Kiko Beats with help from [contributors](https://github.com/Kikobeats/jsonsort/contributors).\n\n\u003e [kikobeats.com](https://kikobeats.com) · GitHub [Kiko Beats](https://github.com/Kikobeats) · Twitter [@Kikobeats](https://twitter.com/Kikobeats)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikobeats%2Fjsonsort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkikobeats%2Fjsonsort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikobeats%2Fjsonsort/lists"}