StubbleOrg / Stubble

Trimmed down {{mustache}} templates in .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I solve nested stubble values from mustache

dhruvalShahTatvasoft opened this issue · comments

Example is as below:
{{ config.mapping.value[ {{ input.Id}} ] }}

Here, config and input is the provided Json objects, and I want to access it's values.

Hi there,

In mustache you're not able to perform templating inside your tags. You could make a lambda which would return you the value when you run the template however the recommended approach is to massage your inputs into a "good" shape before templating so there is no logic in your templates.

Hopefully that helps.