I had trouble with this too, but remember earlier in the Map it said that you must use bracket notation if the property name has a space. The same thing applies if the property name is actually a string.
Think about it this way: lookup.charlie = “Chicago” but lookup.“charlie” will cause an “Identifier not found” error. Dot notation won’t work because the variable val is a actually a string and lookup.val would be interpreted as: lookup.“charlie” instead of lookup.charlie (which is what you actually want). Therefore you must use the bracket notation to pass the string variable into object query in order to access the lookup[“charlie”] value.
Interestingly, if you wanted to change the value of “alpha”, you can just type lookup.alpha = “Alberta”. The compiler knows when your identifier is actually a string, but not when the identifier is actually a string variable.