Hi Marco,

Not much of an angular problem. More of a data-manipulation one. lets see
es6 like:

let tmp  = data.reduce((table,elem) => toTable(table,elem),{});
let table = Object.keys(tmp).map(i => tmp[i]);

function toTable(table, elem) {
   table[elem.item] = (table[elem.item]||0) + item.qty;
   return table;
}



Typed up here in the browser, so there might be a syntax error in somewhere.
Now use a ngRepeat over the resulting table var, and you should be done.

If you have any more questions, do not hesitate to ask.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to