I am creating json file using echo statement ,it works fine as long as static string.
echo '
{
    "common": {
        "baseUri": "https://mycompany.com",
        "ipPrefix": "192.23.4.",
     }
}' > test.json
But when I need to interpolate string inside echo command it is not working.
 echo '
    {
        "common": {
            "baseUri": "$company_name",
            "ipPrefix": "192.23.4.",
         }
    }' > test.json
How to create json file in jenkins with parameter values substituted?
 
     
    