1.0.0 • Published 8 years ago
obj-query v1.0.0
obj-query
Convert a single-level nested object to a querystring compatible representation
Install
$ npm install --save obj-query
Usage
var query = require('obj-query')
query({foo: 1, bar: {baz: 2}})
//=> {foo: 1, 'bar[baz]': 2}
API
query(obj)
-> object
obj
Required
Type: object
An object to flatten (one level) into a querystring compatible format.
License
MIT © Ben Drucker
1.0.0
8 years ago