JSFiddle - React, Tailwind, and code Playground
HTML
<div id="testdiv" data-val="valueofval" data-other="val2"></div>
JavaScript
$('#testdiv').removeData(['val', 'other']);
$('#testdiv').append($('#testdiv').data('other'));
<div id="testdiv" data-val="valueofval" data-other="val2"></div>
$('#testdiv').removeData(['val', 'other']);
$('#testdiv').append($('#testdiv').data('other'));