0.1.1 • Published 7 years ago

jpl v0.1.1

Weekly downloads
11
License
MIT
Repository
github
Last release
7 years ago

jpl

Command line JSON parser, processor

Installation

Note: jpl requires requires Node.js v8.0.0 or later.

npm install -g jpl

Usage

$ jpl --help

  Usage: jpl [options]


  Options:

    -V, --version      output the version number
    -c, --code <code>  Function to execute to parse JSON
    -h, --help         output usage information

Examples

Parse JSON and Format

$ < example.json | jpl
{
  "data": [
    {
      "foo": "bar",
      "bar": "foo"
    },
    {
      "foo": "foobar",
      "bar": "barfoo"
    },
    {
      "bar": "foo"
    }
  ]
}

Process parsed JSON with JavaScript function

$ < example.json | jpl -c "({ data }) => data.filter(({ foo }) => foo)"
[
  {
    "foo": "bar",
    "bar": "foo"
  },
  {
    "foo": "foobar",
    "bar": "barfoo"
  }
]
0.1.1

7 years ago

0.1.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago