JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<label for="loc1">Loc 1:</label> <input name="location" id="loc1"><br>
<label for="loc2">Loc 2:</label> <input name="location" id="loc2"><br>
<label for="loc3">Loc 3:</label> <input name="location" id="loc3"><br>
<label for="loc4">Loc 4:</label> <input name="location" id="loc4"><br>
</form>
JavaScript
var form = $('form');
var LOCATION = {};
LOCATION.option = form.find('input[name=location]').toArray();
LOCATION.labels = $.map( LOCATION.option, function(input) {
return($('label[for='+input.id+']').get(0));
});
console.log(LOCATION);