Skip to content

Instantly share code, notes, and snippets.

View dharFr's full-sized avatar

Olivier Audard dharFr

View GitHub Profile
@dharFr
dharFr / jquery.unserialize-0.2.js
Created June 6, 2011 10:22 — forked from rcmachado/jquery.unserialize.js
$.unserialize [updated] for jQuery
/**
* $.unserialize
*
* Takes a string in format "param1=value1&param2=value2" and returns an object { param1: 'value1', param2: 'value2' }.
* If the "param1" ends with "[]" the param is treated as an array.
*
* Parses the value as String, Int or Boolean
* @todo: parseFloat could also be useful I guess.
*
* Example: