title: create object array using attributes of list
body: <p>I want to create an object array from values/attributes in a list, but the following doesn't work:</p>
  
  <pre><code>$('ul.list').each(function() {
          var localproducts = [];
          $(this).find('li').each(function(){
                  var $itm = $(this);
                  localproducts.push( dataid : $itm.attr('data-id'), data-package: $itm.attr('data-package'), package-id: ($itm.children('.packageid').text()) );
              });
          catalogue.push(localproducts);  
  
          });
  </code></pre>
  
  <p>Thanks for the help.</p>