get element by data attribute value html code example
Example 1: get data attribute javascript
// <div id="element" data-name="john"></div>
const el = document.querySelector('#element')
el.dataset.name // 'john'
Example 2: js select by data attribute
$("[attribute=value]")