spf13/cobra

Nested Query using set function

yonatan555 opened this issue · 2 comments

I have this json:
{
"otlp_agent_collectors": [
{
"interval_in_seconds": 2,
"name": "watch_dog",
"state": "disabled"
},
{
"interval_in_seconds": 2,
"name": "otlp_agent",
"state": "disabled"
},
],
"script_collector_settings": {
"metrics": []
}
}

and I want to change the state into 2nd obj in the otlp_agent_collectors to enabeld
I used this function:
set("otlp_agent_collectors[1].state", "enabeld")

but it doesnt work,
what can be done?

@yonatan555 did you open your issues on the right project?

@marckhouzam
I think I was confused, and should open it in viper project