I have this Javascript variable :
var Item_properties = {
id : null,
keys : [],
hydrate: function() {
//get data
this.id = $('input[id=id]').val();
$("#item_key div input").each(function(index) {
this.keys.push($(this).val());
});
}
It is impossible to push any data in keys array, I'm getting the message : Cannot call method 'push' of undefined
Any idea ?