title: How do I send a POST request in nodejs with dictionary containing duplicate keys?
body: <p>I'm trying to do a POST request in nodejs with Restler and this is my code which works and don't have a problem with at all:</p>
  
  <pre><code>var post = function (uri, params, callback) {
      var headers = {"User-Agent": user_agent,"Cookie": _sessionCookie}
      rest.post(uri, {
          data: params,
          followRedirects: false,
          headers: headers
      }).on('complete', function (data, response) {
          callback(data, response)
      })
  }
  </code></pre>
  
  <p>I did a submit on my browser to see what data i'm suppose to pass which is the image below. But my problem is that i'm required to pass two values for the matchanswers key. <br>
  In my code above the 'params' argument in the post function is a dictionary.<br>
  <strong>My question is how do I add two keys(matchanswers) to the 'params' dictionary?</strong><br>
  I've read other posts where they say to do something like:</p>
  
  <pre><code>matchanswers:[1,2]
  </code></pre>
  
  <p>but that doesn't work. When I post a dictionary like this it does work:</p>
  
  <pre><code>{ qid: '226',
  ac: 2,
  hash: null,
  subject: null,
  r1: null,
  is_public: 'on',
  submit: 1,
  answers: '1',
  matchanswers: [ 1 ],
  importance: '3' }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/DZyCg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DZyCg.png" alt="enter image description here"></a></p>