Returns a new array without the empty strings.
var myArray = [ "hakan", "", "0", 0, false ];
myArray = myArray.filterEmpty();
Object.defineProperty(Object.prototype, "getDotNotated", { | |
value: function (dotNotation) { | |
var arrayOfNames = dotNotation.split('.'); | |
var tmp = this; | |
for (var i in arrayOfNames) { | |
if (arrayOfNames.hasOwnProperty(i)) { | |
tmp = tmp[arrayOfNames[i]]; | |
} | |
} |