JSFiddle - React, Tailwind, and code Playground

by John Doe

HTML

<form class="contact-filter">
    <label for="one">first label</label>
    <select id="one">
        <option value="" selected="selected"></option>
        <option value="lorem">lorem</option>        
    </select>
    <label for="two">second label</label>
    <select id="two">
        <option value="" selected="selected"></option>
        <option value="ispum">ipsum</option>        
    </select>    
</form>

JavaScript

$(function() {
    $(".contact-filter + select").each(function() {
        var text = $(this).prev("label").text();
        $(this).children("option[selected='selected']").val(text).text(text);
    });
});