json-to-http-query-string
v1.0.5
Published
Convert JSON to HTTP Query string
Downloads
225
Maintainers
Readme
JSON to HTTP Query string
This package allows you to convert JSON to Http query string
Getting Started
To install the module, run the following in the command line:
npm i json-to-http-query-string --save
Use within your application with the following line of JavaScript:
const jsonToQuery = require('json-to-http-query-string');
//or
//import jsonToQuery from 'json-to-http-query-string'
jsonToQuery({
foo: "hi",
bar: {
blah: [1, 2, 3],
blah2: 123
}
})
//foo=hi&bar%5Bblah%5D%5B0%5D=1&bar%5Bblah%5D%5B1%5D=2&bar%5Bblah%5D%5B2%5D=3&bar%5Bblah2%5D=123