title: Expanding array variables
body: <p>I have an issue with expanding array variables. Here is what I am trying to do:</p>
  
  <pre><code>set array[0]=a
  set array[1]=b
  set array[2]=c
  
   FOR /l %%x IN (0 1 2) do curl  -XGET  -H "Authorization: Bearer %TOKEN%" "https://baseURL/%array[%%x]%/params" -H "content-type: application/json" &gt; %%x.json
  </code></pre>
  
  <p>I have tried using delayedexpansion, but it didn't help either </p>
  
  <pre><code>setlocal enabledelayedexpansion
  FOR /l %%x IN (0 1 2) do curl  -XGET  -H "Authorization: Bearer %TOKEN%" "https://baseURL/!array[%%x]!/params" -H "content-type: application/json" &gt; %%x.json
  </code></pre>
  
  <p>I've tried many variations including</p>
  
  <pre><code>!array[%%x]!
  !%array[%%x]%!
  !%array[!%x%!]%!
  </code></pre>
  
  <p>Can you please help?</p>