My model has properties with special characters (received from a web service) that I need to reference using bracket notation. Is there a way I can reference these properties when rendering my template with this.model.toJSON()? I currently am overriding toJSON to map them.
Update, another way that is probably the best/easiest yet: $(this.el).html(this.template({ data: this.model.toJSON() })); and referencing the property with data['@invalid-property-#characters'].
Update, example template:
<span><%= section_name %></span>
<span><%= @type %></span <!-- won't work -->
<span><%= data['@type'] %></span> <!-- works -->
toJSONin the model and map the properties with special characters differently.this.template({ scopedVariable: this.model.toJSON() })and in the template<%= scopedVariable['@invalid-variable-#name'] %>