how to access data atributes js code example
Example: html javascript find data attribute
//javascript get html data attribute
const btns=document.querySelectorAll('button[data-id]');
[...btns].forEach(btn => console.log(btn.getAttribute('data-id')))