function getValue(obj, objname){
return objname.split(".").reduce((o,p)=>o[p],obj);
}
obj = getValue("bbb.ccc", aaa);

実際にはnullチェックとか必要かもしれんが