I would like to create a simple filtering language in Javascript.

I want to search inside a collection of products, say:

```
product=[
   {price:10,name:"T-Shirt",category:"Clothing",published_at:"07-08-2014",size:"10x30",color:"#0000FF"},
   {price:20,name:"Chair",category:"Furniture",published_at:"09-03-2013",size:"30x30",color:"#00FF00"},
   {price:30,name:"iPhone",category:"Phones",published_at:"17-03-2014",size:"40x30",color:"#FF00FF"},
   {price:40,name:"Samsung Galaxy",category:"Phones",published_at:"12-01-2012",size:"10x60",color:"#00BBBB"},
];

```

With only one input of text, I would like to be able to query inside this array, for example:

* `cat:Clothing` => gives back the tshirt
* `price:>15` => gives back Chair, iPhone, and Samsung Galaxy
* `name:iP` => Filters trough the names and gives back iPhone
* `price:>15&&size:>35x25` => Filters trough the names and gives back iPhone

I know they are some language parsers like

* <https://github.com/tolmasky/language>
* <https://github.com/zaach/jison> (used by coffeescript)

but I don't know which one to choose (and why) and if it is a good idea to use one ? Any ideas ?