I have a function that is repeated a few times, and I believe it is possible to simplify and send variables from an array.
var i = masterdata.timing.split(',');
var index = 0;
for (index = 0; index < i.length; ++index) {
$("#timing_" + i[index].trim()).prop('checked', true);
}
var i = masterdata.concern.split(',');
var index = 0;
for (index = 0; index < i.length; ++index) {
$("#concern_" + i[index].trim()).prop('checked', true);
}
var i = masterdata.steps.split(',');
var index = 0;
for (index = 0; index < i.length; ++index) {
$("#steps_" + i[index].trim()).prop('checked', true);
}
Maybe just change the categories into a variable and send the catergories from an array?
var chkgroup = [
'timing, concern, steps'
]