I have this piece of code:
['design','finish','grills'].each(function(type) {
this.json.type.each(function(obj, index) {
console.log(obj);
});
}.bind(this));
And get this error:
this.json.type is undefined
How do I go about making type a valid thing to do an each on?
I am not sure of the correct terminology so any help with this will also be a bonus 🙂
How about:
Currently your code is trying to find an attribute named
typerather then the key which the variable contains.