#1 Re: mORMot 2 » Mustache get list of variables after parse » 2023-07-24 11:24:25

Thanks, that works for me.
Now I'm a bit embarrased that I did not find the ftags while digging around.

#2 mORMot 2 » Mustache get list of variables after parse » 2023-07-21 07:00:13

oldwired
Replies: 2

Is there a way to get a list of the variables a document contains after I parse it.

For example after

mustache := TSynMustache.Parse(
    'Hello {{name}}'#13#10'You have just won {{value}} dollars!');

I want to be able to call something like

var variablelist:=mustache.getVarList;

and receive a list that contains "name" and "value". I dug around in the code but did not find something, but I imagine mustache must have such list somewhere after parsing, so I think I must have missed something (ovious).

Board footer

Powered by FluxBB