Deserialize query string to JSON object

javascript, jquery, underscore.js

Solution

You have Ben Alman's `jQuery BBQ` and a `jQuery.deparam` in it. It is described as `The opposite of jQuery.param, pretty much.`

http://benalman.com/code/projects/jquery-bbq/examples/deparam/

First example is exactly what you need.

Problem

Tried to find how to make `{foo:"bar"}` from `?...&foo=bar&...` but googled and got only to `jQuery.params` which does the opposite. Any suggestions please (built-in javascript function, jQuery, Underscore.js - all goes)? Or, do I need to implement it by myself (not a big hassle, just trying not to reinvent the wheel)?

Original source

Related problems