Joel Purra: Developer and more

jqnpm logotype, a Penrose triangle

jq-object-sorting

Sort objects by keys or values.

This is a package for the command-line JSON processor jq. Install the package in your jq project/package directory with jqnpm:

jqnpm install joelpurra/jq-object-sorting

Usage

import "joelpurra/jq-object-sorting" as ObjectSorting;

# ObjectSorting::byKeyAsc
# ObjectSorting::See also ObjectSorting::byKeyDesc.
{ "b": 1, "a": 2 } | ObjectSorting::byKeyAsc		# { "a": 2, "b": 1 }

# ObjectSorting::byValueAsc
# ObjectSorting::See also ObjectSorting::byValueDesc.
{ "a": 2, "b": 1 } | ObjectSorting::byValueAsc		# { "b": 1, "a": 2 }

License

Copyright (c) 2014, 2015, Joel Purra http://joelpurra.com/ All rights reserved.

When using jq-object-sorting, comply to the MIT license. Please see the LICENSE file for details.

Background animations by hexagonif.