JSFiddle - React, Tailwind, and code Playground
JavaScript
splitprop : function(start, target) {
// Searches for all inputargs starting with the string 'start'
// And creates an array of objects for these under this[target]
this[target] = [];
for(var key in this.params)
if (key != target && (key.indexOf(start) == 0)) {
var values = this.params[key] != "" ? this.params[key].split(";") : [""] ;
for (var i = 0; i < values.length; i++) {
if (i == this[target].length)
this[target].push({});
if (/^true$/.test(values[i]))
this[target][i][key.substring(start.length)] = true;
else if (/^false$/.test(values[i]))
this[target][i][key.substring(start.length)] = false;
else
this[target][i][key.substring(start.length)] = values[i];
}
}
}