in lib/common_generator.js [422:450]
visitMapAccess(ast, isExpr, level) {
assert.equal(ast.type, 'map_access');
let expr = _name(ast.id);
if (expr.indexOf('@') > -1) {
expr = `this.${expr.substr(1)}`;
}
if (ast.propertyPath && ast.propertyPath.length) {
var current = ast.id.inferred;
for (var i = 0; i < ast.propertyPath.length; i++) {
var name = _name(ast.propertyPath[i]);
if (current.type === 'model') {
expr += `.get${_upperFirst(name)}()`;
} else {
expr += `.get("${name}")`;
}
current = ast.propertyPathTypes[i];
}
}
if (isExpr) {
this.emit(`${expr}.get(`);
this.visitExpr(ast.accessKey);
this.emit(`)`);
} else {
this.emit(`${expr}.put(`, level);
this.visitExpr(ast.accessKey);
this.emit(`, `);
}
}