My goal is to make values of inner fields accessible to outer fields in a nested dictionary.
Let's say I have the following code
diction: {
"outer": "part1",
{
"inner": "part2"
}
"outer and inner": outer + inner
}
The above code doesn't work since inner is not accessible due to scoping. I want to do something like global
diction: {
"outer": "part1",
{
global "inner": "part2"
}
"outer and inner": outer + inner
}
or find a way to make jsonnet variables mutable so I can still modify a variable to extract the value of inner.
diction: {
"outer": "part1",
"outer and inner": "",
{
"inner": "part2",
"outer and inner": outer + inner
}
}
Is there a way to do something like that?