[Answered ]-Django template cannot access JSON Key in duplicate quotations: {" 'Key' ": " Value "}

2👍

From the template reference docs:

Variable names must consist of any letter (A-Z), any digit (0-9), an underscore (but they must not start with an underscore) or a dot.

So quotes aren’t allowed, and the template language has no way to directly access those properties.

You could write your own template tag to look up dictionary items by a variable key (as in this question) but I would suggest fixing your data.

Leave a comment