title: Bash Store Curl Results into Array
body: <p>I am running the following curl command:</p>
  
  <pre><code>results=$(curl -USERNAME:PASSWORD "URL/search/dates?dateFields=created&amp;from=${Three_Months_Ago}&amp;today&amp;repos=generic-sgca")
  echo "$results"
  </code></pre>
  
  <p>I am getting this in return:</p>
  
  <pre><code>"results" : [ {
      "uri" : "URL/api/storage/generic-sgca/Lastest_Deploy.tar",
      "created" : "2017-09-14T11:59:14.483-06:00"
    }, {
      "uri" : "URL/api/storage/generic-sgca/Installer-Deploy-0.0.5/SignalStudioPro-Alpha-1-linux-x64-installer.run",
      "created" : "2017-09-14T20:11:37.733-06:00"
    }
  </code></pre>
  
  <p>It doesn't seem to actually be storing the curl results as an array. I want to be able to store each "uri" as a variable and use an "-X DELETE" command to remove each file. How can I get the "uri" line on it's own, remove the "created" option.</p>
  
  <p>EDIT:</p>
  
  <p>I've used the following command:</p>
  
  <pre><code>results=$(curl -username:password "URL/api/search/dates?dateFields=created&amp;from=${Three_Months_Ago}&amp;today&amp;repos=generic-sgca" | jq -r '.results[].uri')
  echo "$results"
  </code></pre>
  
  <p>I got this in return:</p>
  
  <pre><code>URL/api/storage/generic-sgca/Lastest_Deploy.tar
  URL/api/storage/generic-sgca/Installer-Deploy-0.0.5/SignalStudioPro-Alpha-1-linux-x64-installer.run
  URL/api/storage/generic-sgca/Installer-Deploy-0.0.5/SignalStudioPro-Alpha-1-windows-installer.exe
  URL/api/storage/generic-sgca/Installer-Deploy-0.0.99/SignalStudioPro-Alpha-1-linux-x64-installer.run
  URL/api/storage/generic-sgca/Installer-Deploy-0.0.99/SignalStudioPro-Alpha-1-windows-installer.exe
  URL/api/storage/generic-sgca/Installer-Deploy-0.2.0/SignalStudioPro-Alpha-2-linux-x64-installer.run
  URL/api/storage/generic-sgca/Installer-Deploy-0.2.0/SignalStudioPro-Alpha-2-windows-installer.exe
  URL/api/storage/generic-sgca/Installer-Deploy-100.0.0/SignalStudioPro-Alpha-2-linux-x64-installer.run
  URL/api/storage/generic-sgca/Installer-Deploy-100.0.0/SignalStudioPro-Alpha-2-windows-installer.exe
  URL/api/storage/generic-sgca/Installer-Deploy-101.0.0/SignalStudioPro-Alpha-2-linux-x64-installer.run
  URL/api/storage/generic-sgca/Installer-Deploy-101.0.0/SignalStudioPro-Alpha-2-windows-installer.exe
  URL/api/storage/generic-sgca/Installer-Deploy-99.9.9/SignalStudioPro-Alpha-2-linux-x64-installer.run
  URL/api/storage/generic-sgca/Installer-Deploy-99.9.9/SignalStudioPro-Alpha-2-windows-installer.exe
  URL/api/storage/generic-sgca/Installer-Deploy-99.9.91/SignalStudioPro-Alpha-2-linux-x64-installer.run
  URL/api/storage/generic-sgca/Installer-Deploy-99.9.91/SignalStudioPro-Alpha-2-windows-installer.exe
  </code></pre>
  
  <p>Now I want to run a curl -X DELETE command to delete each of those urls from my Artifactory page. The command would be:</p>
  
  <pre><code>curl username:password -X DELETE "URL FROM ABOVE"
  </code></pre>
  
  <p>But I can't figure out how to store each line as a separate variable so I can delete each one.</p>