javascript object to params string
var queryString = Object.keys(params).map(key => key + '=' + params[key]).join('&');
javascript object to params string
var queryString = Object.keys(params).map(key => key + '=' + params[key]).join('&');
javascript convert object to querystring
const queryString = new URLSearchParams(props.location.search);
//or
var queryString = Object.keys(params).map(key => key + '=' + params[key]).join('&');
//Extracting query String key value pairs
for (let param of queryString.entries()) {
console.log(param);
}
javascript get params from query string json object
let parameters = 'www.goole.com?code=1232';
// const value = parameters.get('emailVf');
var search = parameters.split('?')[1];
parameters = JSON.parse('{"' + decodeURI(search).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g,'":"') + '"}')
alert(JSON.stringify(parameters))
output : {code:1232}:
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us