I have an errant question about my xp script that I wrote to help manage my game, here's a snippet of the bug in question: var players = findObjs({
_pageid: Campaign().get("playerpageid"),
_type: "graphic",
});
var characters = new Array();
_.each(players, function(obj){
log(obj); //Works fine, logs entire JavaScript object-type
log(obj["represents"]); //Returns 'undefined;
}); The loop properly cycles through all the graphics, and properly logs out the entire object with all the needed properties, but when I try and access the 'represents' property, it returns undefined, which I can then work around with this snippet of code: var players = findObjs({
_pageid: Campaign().get("playerpageid"),
_type: "graphic",
});
var characters = new Array();
_.each(players, function(obj){
log(obj); //Same as before
log(JSON.parse(JSON.stringify(obj))["represents"]); //Finally returns property as string
}); All I want to know is if anyone else has a clue as to why I have to write in this awkward work-around of turning an already working object into a JSON string, and then turning the JSON back into the same object so I can access it.