JSFiddle - React, Tailwind, and code Playground
HTML
<label>35</label><input type="checkbox" name="Size[]" id="35" value="35"><br />
<label>35.5</label><input type="checkbox" name="Size[]" id="35.5" value="35.5"><br />
<label>36</label><input type="checkbox" name="Size[]" id="36" value="36"><br />
<label>Red</label><input type="checkbox" name="Colour[]" id="red" value="red"><br />
<label>Blue</label><input type="checkbox" name="Colour[]" id="blue" value="blue"><br />
<label>40.4</label><input type="checkbox" name="Size[]" id="40.4" value="40.4"><br />
<label>Leather</label><input type="checkbox" name="Size[]" id="leather" value="leather"><br />
CSS
label {
float:left;
width: 60px;
}
JavaScript
var returnedResults = "#Size=35.5&Size=35&Size=36&Colour=red&Material=leather&Size=40.4";
var results = new Array();
results = returnedResults.split('&');
$.each(results, function(i) {
var start = results[i].indexOf('=');
results[i] = results[i].substr(start + 1);
});
$('input').each(function() {
if ($.inArray($(this).val(), results) > -1) {
$(this).attr("checked", "checked");
}
});