object property is a string code example
Example 1: javascript object get property or default
let value = obj.property || "default";
Example 2: javascript object string property
myObject['thing'] = true;
Example 3: object notation string javascript\
function getValueFromNotation(obj: Object,is: string|any[], value: any = undefined) {
if (typeof is == 'string')
return getValueFromNotation(obj,is.split('.'), value);
else if (is.length==1 && value!==undefined)
return obj[is[0]] = value;
else if (is.length==0)
return obj;
else
return getValueFromNotation(obj[is[0]],is.slice(1), value);
}