How can I get something like this working in jsonnet?
{
if 1 == 1 then
store: true
}
I get the below error when I run it with jsonnet:
STATIC ERROR: a.jsonnet:2:9-11: unexpected: if while parsing field definition
I would like to generate a json like this, just as an example, but while evaluating some conditions:
{
"store": true
}
Below snippet implements conditional
store_A
andstore_B
fields, corresponding toval_A
andval_B
values, ab-using jsonnet[null]
evaluated fieldname to remove it from being manifested