json-to-http-query-string

1.0.5 • Public • Published

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

Package Sidebar

Install

npm i json-to-http-query-string

Weekly Downloads

20

Version

1.0.5

License

ISC

Unpacked Size

1.85 kB

Total Files

3

Last publish

Collaborators

  • syysbiir