concatenating variables to get nested dictionary items

I’m hung up on syntax at the moment and was wondering if someone could point out what I’m doing incorrectly.

I’m trying to create an ntp.j2 template and populate peers based on the value of ansible_local.datacenter. This is a sanitized example:

My dictionary:

msg={{ ntp[ansible_locall.datacenter]['peer1'] }}

[ntp] is a list containing ntp dictionary, that list does not have a
chicago key (lists don't have keys, just ordinals).

Your answer is so obvious now … thank you for your quick reply.