Closed rakucmr closed 5 years ago
You can use bracket notation, just as with regular JavaScript. I'll add the following example to the docs to illustate that. Once published it will be at: www.jsviews.com/#paths@bracketnotation
data = {
"first name": "Jo",
"address": {
"1stLine": "My Place",
"street.name": "Broadway"
}
}
<script id="myTmpl" type="text/x-jsrender">
{{:#data["first name"]}} lives at
<em>
{{>address['1stLine']}}
{{>~root["address"]["street.name"]}}
</em>
</script>
Thanks, this is working!
How can I use with variables name that have a dot inside, like this: