I am initialising an object properties with dynamic keys and values from within my object's prototype. So I do this:
var base_proto = {
init_props : function (props){
$.each(props, function(key, value) {
this[key] = value;
});
}
}
This does not work and just return an Object with no properties.
But when I try this.notDynamicName = notDynamicContent; in init_props it worked.
So basically, the dynamic assignment of keys and value is the problem.
So how can I deal with that?
Your responses would be greatly appreciated.