Mapping value for a key in JSON file with value from MD file?

In Hugo,
Can an element in JSON file take data from MD file ?
If yes then …
How to map value for a key in JSON file with value from MD file ?
Say for an instance in below json structure, json key “source” must be mapped to a data from MD file.

{
source: value — Must get from MD file.
title: “My image”
}

Not that I know of. Hugo can read JSON files, but it cannot execute functions that are written inside the JSON file.

Of course, you can write logic for this in the Hugo template file. Like, if the JSON value contains "ABC", then execute the upper function (or whatever you want). :slight_smile: