 <p>Using <a href="http://underscorejs.org/#object">underscore's object function</a>, you can do this:</p> <pre><code>form_values = _.object([f.name, f.value] for f in $('input, textarea, select')) </code></pre>