Suppose I have this:
var a = { A : { AA : 1 }, B : 2 };
Is there a way for me to create a variable that could allow me to reference either
With lodash _.get function, you can access nested properties with dot syntax.
Node server-side example:
const _ = require('lodash'); let item = { a: {b:'AA'}}; _.get(item, 'a.b');