How to view items value one by one

this.db.executeSql("SELECT * FROM  user",{})
	.then((data) => 
	{    let items = [];
		for(let i=0; i<data.rows.length; i++)
		{
			items.push({rowid:data.rows.item(i).name});
			
		}
		console.log(items[0]);
	}).catch((e) => console.log("faild"));

Hello,

I am not sure if I understand correct.

At the end you have an filled array. You can access each element with his index and can show it with bind, for example string interpolation in your app. For more flexibility you can use a variable that is filled by an action, for example (click) event and bind this variable by string interpolation or property binding to whatever.

Best regards, anna-liebt.

1 Like