If you want to make the code a touch more elegant, you should match up the attributes names (strength, dexterity, etc) used in the select dropdown - don't use ST, DX, etc in one place, and strength, dexterity, etc in the other. That allows you to use this for the worker: on(`change:repeating_skills:skillmod change:repeating_skills:attribute change:st change:dx change:iq change:ht change:per change:will`, function(){ console.log('triggered'); getSectionIDs('repeating_skills', function (ids) { const fieldnames = []; ids.forEach(id => { fieldnames.push( `repeating_skills_${id}_skillMod`, `repeating_skills_${id}_attribute` ); }); getAttrs([...fieldnames,"ST","DX","IQ","HT", "PER", "WILL"], function(value){ const output = {}; ids.forEach(id => { let modVal= +value[`repeating_skills_${id}_skillMod`]||0; let attr=value[`repeating_skills_${id}_attribute`]; let attrmod = +value[attr]||0; output[`repeating_skills_${id}_skillLevel`] = modVal + attrmod; output[`repeating_skills_${id}_name`] = attr; }); setAttrs(output); }); }); }); Here I assumed you changed the names at the start. It would be easier ti change the select, but those names seem more sensible. In this worker, you grab the attribute name from the select as before, but then you grab the attribute value directly, with let attrmod = +value[attr]||0; Since the attributes have been included in getAttrs, and have the same name as in the select dropdown, you can just use that dropdown name to grab their value. Final bit of advice, something to do with all selects, is this: < select name = "attr_attribute" class = "attrSelect" > < option selected > - </ option > < option > ST </ option > < option > DX </ option > < option > IQ </ option > < option > HT </ option > < option > PER </ option > < option > WILL </ option > </ select > Add an option at the start for when players haven't selected something, and use selected to make that the default. Without this, its easy for players to assume that ST is selected, because it is showing in the dropdown. But it isn't. And the only way to select it is first select something else, and then go back to ST. You could instead make sure the first entry is actually selected, like so: < select name = "attr_attribute" class = "attrSelect" > < option selected > ST </ option > < option > DX </ option > < option > IQ </ option > < option > HT </ option > < option > PER </ option > < option > WILL </ option > </ select > But I prefer the first option. You need to do this for all selects.