2021年3月18日星期四

How can I use variables in json file?

There is a value that is used several times in a json file.

I want to make this value as a variable, and want the variable to be used instead of inserting string each time.

  "DOCKER_IMAGE": "registry.somewhere.com:tag",    "components":[      {        "name": "component_1",        "docker_image": $DOCKER_IMAGE        ...      },      {        "name": "component_2",        "docker_image": $DOCKER_IMAGE        ...      }  

Something like this.

How can I achieve this?

https://stackoverflow.com/questions/66702622/how-can-i-use-variables-in-json-file March 19, 2021 at 12:46PM

没有评论:

发表评论