Filter data

I need to calculate the number of race(course) that rang == 1
{ id: ‘1’, course: ‘Ab’, rang: 1 },
{ id: ‘2’, course: ‘c1’, rang: 3 },
{ id: ‘3’, course: ‘Ab’, rang: 2},
{ id: ‘4’, course: ‘bc’, rang: 1},
{ id: ‘5’, course: ‘bc’, rang: 5},

Can you elaborate?
Otherwise go check https://www.tutorialspoint.com/typescript/typescript_operators.htm

not this !!! :smirk:

Read the Array documentation. There are several ways of doing this. Two that come to mind are filter().length and a forEach() that increments a lexical variable.

1 Like