const getAttribute = (object /*目标对象*/,attribute /*目标属性*/, defaultValue /*默认值*/)
示例:
const obj = {a: {b: {c: 100}}, d:[{f: 'abc'}]};
getAttribute(obj, 'a.b.c', 0) === 100
getAttribute(obj, 'a.b.e', 'default') === 'default'
getAttribute(obj, 'd.0.f') === 'a.b.c'