Wynn Netherland changelog.com/posts

node-querystring: Nested querystring parser for Node.js

If you’re missing the Rails or Rack style nested query string parsing removed from Node.js in 0.3.x, check out the latest project from TJ Holowaychuk.

Node-Querystring can be installed via npm:

npm install node-querystring

Now you can handle those nested query strings with parse:

require('querystring').parse('user[name][first]=Elmer&user[name][last]=Fudd');
// => { user: { name: { first: 'Elmer', last: 'Fudd' }}}

A small module, but quite convenient. If you’re a user of Express or Connect, TJ just updated those projects to include the new bits.

[Source on GitHub]


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00