JSFiddle - React, Tailwind, and code Playground
by dixalex
JavaScript
var other_fields = $('input').filter(function(i, el) {
return /specified/.test($(el).attr('name').toLowerCase());
});
other_fields.each(function(index, element) {
var choice_text = $(element).closest('label').find('.choice-text');
$(element).appendTo(choice_text);
console.log($(element).attr('id'));
});