How do I reference a field name that contains a dot in mustache template?
问题 How do I reference a field name that contains a dot in mustache template? For instance, if I have a view like { "foo.bar": "my value" } then how can I put my value into a template? Using {{foo.bar}} doesn't work because mustache thinks the dot is part of the path, like there should be a "foo" that has a "bar". 回答1: You can't read a key with a . in it from Mustache. The Mustache spec dictates that . is used to split content names. Mustache provides a means of escaping but only for HTML content