2

I´m quite new to Angular 2 and I have a question: I´ve a JSON-Array, which looks like this:

[
         {
            "eventid": "17404",
            "start": "20161106232500",
            "stop": "20161107001000",
            "channel": "562954314656614"
         },
         {
            "eventid": "17405",
            "start": "20161107001000",
            "stop": "20161107001500",
            "channel": "562954314656614"
         },
         {
            "eventid": "17406",
            "start": "20161107001500",
            "stop": "20161107004500",
            "channel": "562954314656614"
         },
         {
            "eventid": "17407",
            "start": "20161107004500",
            "stop": "20161107021000",
            "channel": "562954314656614"
         },
         {
            "eventid": "17408",
            "start": "20161108004500",
            "stop": "20161108021000",
            "channel": "562954314656614"
         },
         {
            "eventid": "17409",
            "start": "20161109004500",
            "stop": "20161109021000",
            "channel": "562954314656614"
         },
]

Each object has the "start"-attribute, which is a date. I want now the array to be grouped by days in the view.

The original Array can contain ~1000-3000 Values, so it should be a good performance...

Thanks!

Edit: I know there is a solution in Angular 1 by the "group-by"-propertie, but i don´t find any solution on Angular 2... So: Are there any ways to do this in Angular 2?

Junias
  • 3,037
  • 2
  • 15
  • 21
  • Thank you, but this is for Angular 1 (JS). I didn´t found a good solution for Angular 2... – Junias Nov 07 '16 at 14:38
  • I edited the question to show this is not a duplicate... – Junias Nov 08 '16 at 06:49
  • Indeed, @Cerbrus, is there a way to unmark this as duplicate? This question is not a duplicate of the question posted which refers to Angular 1. – apbarratt Dec 01 '16 at 11:28

0 Answers0