I have a model containing attributes in a multidimensional array. In the template function of the view, I want to unpack this array but I'm not sure how to accomplish this with underscore.js. I've looked around on google, but I can't seem to find a straightforward example.
For Example, here is a multidimensional array:
array(
"elementTag" => "li",
"elementClass" => "dashboard",
"elementContent" => array(
"elementTag" => "a",
"elementContent" => "The Value I want to Display!!!",
"href" => "#home"
)
)
If my template: looks like this:
template: _.template('<<%= elementTag %> class="<%= elementClass %>">...</<%= elementContent %>>')
How would I display the value of elementContent ?:
The Value I want to Display!!!