title: How to pass an array to a jenkins parameterized job via remote access api?
body: <p>I am trying to call a Jenkins parameterized job using curl command. I am following <a href="https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API" rel="nofollow noreferrer">Remote API Jenkins</a>.</p>
  
  <p>I have Active choice parameter plugin. One of the parameters of the job is an Active choice reactive parameter.</p>
  
  <p>Here is the screenshot of the job:</p>
  
  <p><a href="https://i.stack.imgur.com/p8BgV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p8BgV.png" alt="enter image description here"></a></p>
  
  <p>I am using the following curl command to trigger it with parameter:</p>
  
  <pre><code>curl -X POST http://localhost:8080/job/active-choice-test/buildWithParameters -u abhishek:token --data-urlencode json='{"parameter": [{"name":"state", "value":"Maharashtra"},{"name":"cities", "value":["Mumbai", "Pune"]}]}'
  </code></pre>
  
  <p>But I am not able to pass the cities parameter which should be a json array. The above script is giving error.</p>
  
  <p>I am printing the state &amp; cities variable like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Kwj5n.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kwj5n.png" alt="enter image description here"></a></p>
  
  <p>The job is getting executed and showing error for cities:</p>
  
  <pre><code>Started by user abhishek
  Building in workspace /var/lib/jenkins/workspace/active-choice-test
  [active-choice-test] $ /bin/sh -xe /tmp/hudson499503098295318443.sh
  + echo Maharashtra
  Maharashtra
  + echo error
  error
  Finished: SUCCESS
  </code></pre>
  
  <p>Please tell me how to pass array parameter to a jenkins parameterized job while using remote access API?</p>