Fealo
Fealo

Reputation: 99

How to access to a value which is in an array contained in an array typescript angular

In my oomponent, I have an array of array :

weekDays: Array<Array<{title:string, value:number, isChecked:boolean}>>;

The JSON structure of weekDays look like this :

enter image description here

How to access to (for example) the third value of isChecked of the the second array contained in weekDays ( weekDays1 ), IN my HTML template.

Upvotes: 0

Views: 57

Answers (1)

Bryan Ribo
Bryan Ribo

Reputation: 393

Try to add it by doing:

weekDays[1][2].isChecked or weekDays['1']['2'].isChecked

Upvotes: 3

Related Questions