I am bringing a list in JSON format, I store it in a variable and it works fine, the problem is when I try to use it is variable in another side it appears Uncaught TypeError: Can not read property 'V' of undefined, the V is brought from the list.
This is the line where the error is generated.
elementa = video.video[i].V;
The most curious thing is that it is inside a for and even inside if, the thing is when I increase the comparison variable of the if to more than 20 it throws me that error
for(var i = 0; i <= long.length; i++){
if (i <= 30) {
elementa = video.video[i].V;
itemsa.push('<img id="' + elementa.toLowerCase().replace('.mp4', '') + '" src="http://localhost:700/proyecto-daniel/assets/web/img/if_male3_403019.png" alt="" >');
}
}
As we can see, the variable is at 30 and throws the error, if I try to use it on another side it generates the same error. someone knows how I can solve this
When doing a JSON log this is the result, as you can see if it is V