Accder Data-ID JavaScript

<article
  id="voitureelectrique"
  data-columns="3"
  data-index-number="12314"
  data-parent="voitures">
...
</article>
var article = document.getElementById('voitureelectrique');
 
article.dataset.columns // "3"
article.dataset.indexNumber // "12314"
article.dataset.parent // "voitures"
Energetic Eagle