i have a file info.yml that has info like this
"email1@gmail.com":
ame: "Paul"
from: "VISA-PG-Credit Card Acquittal-"
project: "001-Admin"
entity: "01-HTW (Los Angeles)"
"email2@gmail.com"
name: "Bill"
from: "VISA-PG-Company"
project: "005-Admin"
entity: "01-HTW (Panama)"
Now I am trying to access this info from console. When i try this
>>INFO_CONFIG[:"email1@gmail.com"]["project"]
it gives me correct result as "001-Admin" But if i try this as
>>sender = "email1@gmail.com"
>>INFO_CONFIG[:sender]["project"]
It gives me following error:
NoMethodError: undefined method `[]' for nil:NilClass
What is wrong with my syntax?