0

I have config file that inherits a list of properties from a parent file. Parent file looks like below

object: {
   x : {
     .....
     name: x
   }
   y : {
     .....
     name: y
   }

}

And my config file is as below

include "parent.conf"
childConfig : {
   x : ${parent.object.x}
   y : ${parent.object.y}
}

I want to iterate over all the members of childConfig and change the name to 'newName' for each. One way would be

include "parent.conf"
childConfig : {
   x : ${parent.object.x}
   y : ${parent.object.y}
   
   x.name: "newName"
   y.name: "newName"
}

But this is cumbersome if the list grows large. Is there a way to iterate over the configs (maybe for-each?)to set 'name' field for each member?

Yellowjacket
  • 548
  • 2
  • 7
  • 19

0 Answers0