i have one question, i have this class in javascript:
//FactVal
UTIL.Classes.FactVal = function(entity, attribute, value) {
this.entity = entity;
this.attribute = attribute;
this.value = value;
}
UTIL.Classes.FactVal.prototype.setEntity = function(entity) {
this.entity = entity;
}
When im serializing a json string to an object of this type, i want to ask if exists the setEntity method, i have this json:
"FactVal": {
"entity": {
"string": "blabla"
}
}
When i read "entity" i want to know if exists a method "setEntity" in the FactVal class, i think i have to do this: the value of 'i' is "FactVal" and the value of 'j' is "entity".
if(UTIL.Classes[i].("set" + j[0].toUpperCase() + j.substring(1,j.length)))
and dont work, how can i do it?
Thanks.