I have a config file that is like
[
"ECSClusterName=cluster",
"VPCID=vpc-xxxx",
"ALBName=ALB"
]
And with jq (or something else bash-native), I'd like to add 2 values - EnvType and KMSID - (doesn't matter where in the config file) so that the end result would look like
[
"EnvType=dev",
"KMSID=xxxxx-yyyyyy-ffffff",
"ECSClusterName=cluster",
"VPCID=vpc-xxxx",
"ALBName=ALB"
]
The closest I have been for one value is
cat config.json | jq '.[-1] += ", test=test"'
But that outputs
[
"ECSClusterName=cluster",
"VPCID=vpc-xxxx",
"ALBName=ALB, test=test"
]
Any help greatly appreciated!