Convert a javascript object to a url query
npm install object-to-url-query
import objectToUrlQuery from 'object-to-url-query';
const objectQuery = {
name: 'Patrick',
age: 15,
skill: 'Software Enginner'
};
const urlQueryString = objectToUrlQuery(objectQuery);
console.log(urlQueryString); //'name=Patrick&age=15&skill=Software%20Enginner'
var objectToUrlQuery = require('./index');
var objectQuery = {
name: 'Patrick',
age: 15,
skill: 'Software Enginner'
};
var urlQueryString = objectToUrlQuery(objectQuery);
console.log(urlQueryString); //'name=Patrick&age=15&skill=Software%20Enginner'