Just starting to look at Handlebars.js today and wanted a clear approach. Assume the following: We don't have control over how the JSON was created (So no server side solutions). JSON will have 1 or more records in it. In each record, there will be a Message_Type name/value pair the value of which would be useful in some function which css class(es) are used in the presentation.
ex: message_type: basic, ad, notification, warning, critical. Each message_type will have a css class(es). So critical message type might get classes .msg_box .critical_msg.
How should I do this (remember, we can't change the original source).? Option 1: process json data before handlebars and add name/value pair for each that contains the appropriate classes. Option 2: some way in handle bars that is unclear to me.