How to get the id of the item of a list
var clickedItemIndex = $(this).parent().index();
var currentItemArray = Apperyio.storage.item_array.get()[clickedItemIndex];
Apperyio.storage.item.set(currentItemArray);
I used this code to specify which item I am going to see. But I want to keep track of the view count. So every time I click that item, it will increase the view count in the database. This code only has the index, which is 0,1,2,3...in that list, and it is not helpful. I have to know the _id of that row, so that I can do that.
Can someone help me? Thanks!
If you have any idea about how to read and update the view count in the database, that would be great!