I’m trying to update (in runtime with System.put_env) one specific system/config property inside a group of properties. For example in my “config.ex” file I have something like that:
I think there’s an important bit of understanding required application the structure of the application environment. Under the covers, the environment for each application is a keyword list. Using your example:
Here you can see that for your app :my_app there is one configuration key, :group which has the value [pp_1: "example_1", pp_2: "example_2"]. Application.get_env/3 is very similar to:
This is reason why, when you want to update the value for :group, you need to replace the whole value for :group since thats the configuration key. And being an immutable language you can just mutate the exisiting value.