Thank you Sander. I ended up doing something similar to this before passsing it to my page.
Marco CaƱada On Wed, Nov 11, 2015 at 9:44 PM, Sander Elias <[email protected]> wrote: > 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 a topic in the > Google Groups "AngularJS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/angular/R7o9Glv0XgM/unsubscribe. > To unsubscribe from this group and all its topics, 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. > -- 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.
