title: Joining a JSON string array to a single string in ARM Templates
body: <p>I'm trying to join a string array in to a single string. I'm looking for the equivalent of</p>
  <pre class="lang-cs prettyprint-override"><code>string.Join(string.Empty, myApimPolicyArray)
  </code></pre>
  <p>Here's a minimal reproducible sample of my issue</p>
  <p>Comma-Repro.json:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;$schema&quot;: &quot;https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#&quot;,
      &quot;contentVersion&quot;: &quot;1.0.0.0&quot;,
      &quot;parameters&quot;: {
      },
      &quot;variables&quot;: {
          &quot;MyApimPolicyArray&quot;: [
              &quot;&lt;set-body&gt;@{ return null; &quot;,
              &quot;}&lt;/set-body&gt;&quot;
          ]
      },
      &quot;resources&quot;: [
      ],
      &quot;outputs&quot;: {
          &quot;PolicyConcat&quot;: {
              &quot;type&quot;: &quot;Array&quot;,
              &quot;value&quot;: &quot;[concat(variables('MyApimPolicyArray'))]&quot;
          },
          &quot;PolicyString&quot;: {
              &quot;type&quot;: &quot;string&quot;,
              &quot;value&quot;: &quot;[string(variables('MyApimPolicyArray'))]&quot;
          }
      }
  }
  </code></pre>
  <p>run the following PS with Az:</p>
  <pre><code>New-AzDeployment -TemplateFile .\Comma-Repro.json -Location eastus
  </code></pre>
  <p>I've tried template functions such as <code>string()</code> or <code>concat()</code> and they don't give me my expected results. They BOTH give me results that include the square bracket, double quotes, commas in the json.</p>
  <p>for e.g. string gives me <code>[&quot;&lt;set-body&gt;@{ return null; &quot;,&quot;}&lt;/set-body&gt;&quot;]</code></p>
  <p>My expectation is there should be a way to get the following result</p>
  <p><code>&lt;set-body&gt;@{ return null; }&lt;/set-body&gt;</code></p>