I retrieve data from database into list of object then pass the list to View there use it in Java Script.

I want to show the data on zero Index It works when we get data from database and also prints

but when there is no data in db it gives error index out of range because there is no data at zero index.

Here is My Code in JS


Please provide me a solution what to do

Related posts

Recent Viewed