Advertisement
Guest User

Untitled

a guest
May 29th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. results = {};
  2.  
  3. queryRows.forEach(function (row) {
  4. if (!results.hasOwnProperty(row.identifier)) {
  5. results[row.identifier] = {
  6. items: [],
  7. };
  8. }
  9.  
  10. results[row.identifier].items.push(row.itemName);
  11. });
  12.  
  13. return _.values(results);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement