I have a javascript object that I need to flatten into a string so that I can pass as querystring, how would I do that? i.e:
{ cost: 12345, insertBy: \'testUse
Using Lodash library it can be done as:
let data = {} _.map(data, (value, key) => `${key}=${value}`) .join("&");
Note that this library has been imported as:
window._ = require('lodash');