i am new to jsonnet
I am trying to call the name and nb seperately for different operations. But i am getting error "attempted to index array with string name" when i use "specificValues.data.LIST.name" in the code.
local NbMap = { ABC: 1, XYZ: 4 },
LIST: std.map(function(key_name) {
name: key_name,
nb: NbMap[key_name],
}, std.objectFields(NbMap)),
local specificParameters = {
ConfigMap: {
'data': {
connect: [
{ ...
name: 'ALL',
...
filter: std.join(';', std.map(function(name) name + ':NAM==[' + name + ']', specificValues.data.LIST.name)),
...
},
]
+
[
{
Max: specificValues.data.LIST.nb / 5,
...
name: NbMap.name,
...
}
for name in specificValues.data.LIST.name
],
},
},
I am not sure how to call the indexes in jsonnet. Please let me know if anyone knows.