Fork Copy function data_get(target, path, _default = null) { if (!target || typeof target !== 'object') return value(_default); if (['undefined', 'function'].includes(typeof path) || path == null) return target; path = Array.isArray(path) ? path : (path + '').split('.'); var key = undefined; while (key = path.shift()) { if (!target[key]) return value(_default); target = target[key]; } return target; } function value(a) { if (typeof a === 'function') return a(); return a; }