janl / mustache.js

Minimal templating with {{mustaches}} in JavaScript

Home Page:https://mustache.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple nested variables

bassail opened this issue · comments

Hello

I need to know if that is achievable though Mustache.

Let's say I have this kind of simple template :

{{ object }}

and these variables :

{
   "object": "this is my object's {{ property }}"
   "property": "name : {{ value}}",
   "value": "myName"
}

I want to obtain the following result :

this is my object's name : myName

This is an exemple with two nested variables, but it could be more than two.

I've read about partials, but I'm not sure it would help me in this use case.

Thanks for your help