I’m trying to use a generic way to pull my data from my templates, I have my json object that contains the page data I want to pull.
pages.json:
{
"page_1": {
"foo": ""
}
}
I’d like to be able to pull this data by using string concatenation like so:
Pseudo code would look like:
$site_data.{{ .Title }}.foo
in this case .Title = “page_1”
How can I achieve this?