Skip to content

Instantly share code, notes, and snippets.

View dasDaniel's full-sized avatar
💩
[object Object]

Ol' Shrimpeye dasDaniel

💩
[object Object]
View GitHub Profile
@dasDaniel
dasDaniel / deparam
Created October 27, 2013 00:22
deparam javascript split serialized string with square bracket items. ref http://jsfiddle.net/drzaus/8EE8k/
deparam = (function(d,x,params,pair,i) {
return function (qs) {
params = {};
// remove preceding non-querystring, correct spaces, and split
qs = qs.substring(qs.indexOf('?')+1).replace(x,' ').split('&');
// march and parse
for (i = qs.length; i > 0;) {
pair = qs[--i].split('=');
//params[d(pair[0])] = d(pair[1]);