Permalink
Browse files

Merge pull request #32 from jtlebi/master

Added a numeric index in array stringify to preserve reversability
  • Loading branch information...
2 parents 199c17d + 81fa1c7 commit 5a989a2f164473fdbb1d8cd34472a9092022cd14 @tj committed Feb 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/querystring.js
View
@@ -192,7 +192,7 @@ function stringifyArray(arr, prefix) {
var ret = [];
if (!prefix) throw new TypeError('stringify expects an object');
for (var i = 0; i < arr.length; i++) {
- ret.push(stringify(arr[i], prefix + '[]'));
+ ret.push(stringify(arr[i], prefix + '['+i+']'));
}
return ret.join('&');
}

0 comments on commit 5a989a2

Please sign in to comment.