JSFiddle - React, Tailwind, and code Playground

HTML

<div>
    <input type="text" name="jibberish" id="staticid1" />
    <input type="text" name="jibberidsadash" id="staticid2" />
    <input type="text" name="jibberidsadasdash" id="staticid3" />
</div>

JavaScript

$.each($('div').children(), function() {
      $(this).attr("name",$(this).attr("id"));
   });