1.2.4 • Published 5 years ago

query-2-json v1.2.4

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

query-2-json

Build Status npm version npm

Inspired by react-querybuilder

It is simple to use but would be easier to store the query string and convert it back to the json format from the string.

Installation

npm install query-2-json

Usage

const q2j = require('query-2-json')

let q = "(a != 1 || (b == 2 && c <= 3)) && (d != 4)"

let json = q2j(q, { brackets: ['()'] });
console.log(JSON.stringify(json, null, 2))
let rule = q2j(json);
console.log(rule)

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago