How to retrieve checkbox value from firebase to Ionic 3 app


Hello Im trying to display a single piece of data from my firebase database to my ionic 3 app. I’ve tried a few methods but I’m getting an error that says Cannot get name ‘i’.

Heres what I did so far:

I have a list of items that gets populated with data from a JSON file.

I added a check box to each list item dynamically and successfully got to store TRUE or FALSE values and the index of that item to firebase based on the user that is signed in.

Now I’m trying to figure out how to pull the value of the check boxes from firebase to show it checked when ever the user goes to that page. If i refresh the app or go to another page and come back , the checkboxes that are suppose to be checked are not but the values are showing in the console.

I added a function to be able to get the value and display it to checked but its not working as intended. because of the value of i, which is the index.

Can anyone help me figure this out please? I would really appreciate this. Here is my code: