Converting data-* attributes to an object
You can use Object.assign
Object.assign({}, element.dataset)
For browsers that doesn't support Object.assign you can use polyfill
Don't forget about JSON.stringify and JSON.parse.
var data = document.getElementById('someElement').dataset;
data = JSON.parse(JSON.stringify(data));
According to Mozilla this should work all the way back to IE 8 without a polyfill.
in es6 you can use the object spread.{ ...element.dataset }