I have the data object like this:
var data = {};
data['T.Name'] = 'World';
I would like to execute this template:
_.template('Hello <%= T.Name %>!', data)
Error:
ReferenceError: T is not defined
I understand that underscore tries to take T object with the Name property. But I need to make it work with 'T.Name', because I have no chance to change the data format. Please help me!
You can try this:
_.template('Hello <%= data["T.Name"] %>!', data)