Ashutosh There isn’t an explicit Wrk Action to convert query strings into a JSON object. The best way to handle this conversion is by using the “Evaluate JavaScript Expression” Wrk Action.
For example, your “JavaScript expression to evaluate” could look like this:
function queryStringToJSON(query) {
// Remove leading '?' if present
query = query.startsWith('?') ? query.slice(1) : query;
const obj = query
.split('&')
.filter(Boolean)
.reduce((acc, pair) => {
const [key, value] = pair.split('=').map(decodeURIComponent);
acc[key] = value;
return acc;
}, {});
return JSON.stringify(obj);
}
queryStringToJSON('?name=Wrker&city=Montreal&company=Wrk');
Then, set “Parse JSON response?” to True.
This will produce a structured JSON output like so:
{"name":"Wrker","city":"Montreal","company":"Wrk"}