 <p>While <a href="http://stackoverflow.com/a/16317950/887149">two</a> other <a href="http://stackoverflow.com/a/16317947/887149">answers</a> are ok, here is another way to do it.</p> <p>You can use </p> <pre><code>Item_properties.keys.push($(this).val()); </code></pre> <p>Instead of </p> <pre><code>this.keys.push($(this).val()); </code></pre>