This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# fx [![Build Status](https://travis-ci.org/antonmedv/fx.svg?branch=master)](https://travis-ci.org/antonmedv/fx)
Command-line JSON processing tool
## Features
* Don't need to learn new syntax
* Plain JavaScript
* Formatting and highlighting
## Install
```
$ npm install -g fx
```
## Usage
Pipe into `fx` any JSON and anonymous function for reducing it.
```
$ fx [code ...]
```
Pretty print JSON:
```
$ echo '{"key":"value"}' | fx
{
"key": "value"
}
```
Use anonymous function:
```
$ echo '{"foo": [{"bar": "value"}]}' | fx "x => x.foo[0].bar"
"value"
```
If you don't pass anonymous function `param => ...`, code will be automatically transformed into anonymous function.
And you can get access to JSON by `this` keyword:
```
$ echo '{"foo": [{"bar": "value"}]}' | fx "this.foo[0].bar"
"value"
```
You can pass any number of anonymous functions for reducing JSON: