var econda; (function (econda) { var util; (function (util) { /** * @class econda.util.ObjectUtils */ var ObjectUtils = (function () { function ObjectUtils() { } /** * Iterate over all own properties of object * @param {Object} obj * @param {Function} callback * @static */ ObjectUtils.forEachOwnProperty = function (obj, callback) { if (typeof obj === 'object' && obj !== null) { for (var key in obj) { if (obj.hasOwnProperty(key)) { callback(obj[key], key); } } } }; /** * Get object property or property of nestes object. * @param parentObj * @param propertyPath path to property, separated by dots * @returns {any} */ ObjectUtils.getNestedProperty = function (parentObj, propertyPath) { if (typeof parentObj === 'undefined') { return undefined; } var _index = propertyPath.indexOf('.'); if (_index > -1) { return this.getNestedProperty(parentObj[propertyPath.substring(0, _index)], propertyPath.substr(_index + 1)); } return parentObj[propertyPath]; }; return ObjectUtils; }()); util.ObjectUtils = ObjectUtils; })(util = econda.util || (econda.util = {})); })(econda || (econda = {}));