-
Install with npm
npm install object-to-query --save
-
Start using is as simple as:
const transform = require('object-to-query')
const result = transform({ id: 1, name: 'Eduardo' });
console.log(result);
-
You can exclude the properties you want
const transform = require('object-to-query')
const result = transform({ id: 1, name: 'Eduardo', notThisOne: 'i am a bad property', age: 30 }, ['notThisOne']);
console.log(result);
-
I want the question mark as the first symbol in my string!!11UNO
const transform = require('object-to-query')
const result = transform({ id: 1, name: 'Eduardo' }, [], true);
console.log(result);