
I seem to be missing something painfully obvious here. var char = findObjs({ type: 'character', name: options.name}); if(char.length == 0) { //Throw error message and return. omitted for sake of brevity. } var charid = char[0].id; //May need this later, might just fold it into the below. var charattrs = findObjs({type:'attribute', characterid: charid}); log("DEBUG: charattrs: "+JSON.stringify(charattrs)); var attrnames = {"Strength" : "str_pool" //.... etc } var attrid = charattrs.filter(x=>x.name == attrnames[options.attrname]); if(attrid.length == 0) { log("DEBUG: No attr value found.") //This line triggers. If i take the stringified charattrs, parse it again in the console, and run the filter line, I get 1 result. I have verified that attrnames[options.attrname] is returning the correct name. ... ? (and yes, i know filterObjs exists; I'm pulling charattrs to later be able to look up repeating section elements by related fields without having to continually dip back to the source: var skillid = charattrs.filter(x=>x.current == options.skillname); options.skillvalue = charattrs.filter(x=>x.name == "repeating_skills_"+(skillid[0].name.split("_")[2])+"_skillpool"); [This is also failing, incidentally, but i havent gotten to the point of debugging this one yet.] )