This is the log:
0: 89392
1: 4454
2: 196406
3: undefined
4: 181473
5: 35547
6: 26040
7: 102495
8: 96180
9: 20733
10: 33113
11: 86545
12: 25397
13: 4718
14: 40053
15: 51517
16: 9026
17: 26811
18: 63626
19: 18050
Tried:
var casiTestati = filtererdData.map(vd => {
var testatiValid = vd.data.casi_testati;
if(testatiValid != "") {
if(firstRunMap) {
return vd.data[vd.data.length - 1].casi_testati;
}
return vd.data[vd.data.length - 1].casi_testati - vd.data[0].casi_testati;
}
});
Also tried testing with:
if(!testatiValid)
and if(testatiValid = undefined)
and if(typeof testatiValid !== 'undefined') {
But I still get undefined
value
Actually doing:
if(typeof testatiValid !== 'undefined') {
Gives me all values as undefined