<option data-id="1" value="test"></option> javascript get data-id value code example
Example 1: jquery get data-id
const dataId = $('#elementId').attr("data-id");
Example 2: data id
<li data-id="1234" data-email="[email protected]" data-age="21">Calvin</li>