1
At a certain point in my system, I need to consume a method that returns an array, which can contain arrays.
I need to feed a second array with data contained in array leading. See example?
arrayRetorno[0] = item[i].tasks[0].colleagueId;
Some cases may occur that the array tasks do not exist, so how to check if there is a array task contained in the array item?
You have to do if ne... Try to do this: !! item[i]. tasks
– DiegoSantos
If it is the
tasks
which may not exist so what you want to do isif (item[i].tasks) { ...
– Isac