title: node.js join - coming from php implode
body: <p>I have the following code in PHP:</p>
  
  <pre><code>$IDs = implode(",", array_keys($result["matches"]));
  $sql = "SELECT * FROM table WHERE id IN ($IDs)";
  </code></pre>
  
  <p>I am "translating" it into Node.js, and I suppose that implode becomes array.join, so I tried this:</p>
  
  <pre><code>var ids = Object.keys(answer['matches']).join(",");
  var sql = "SELECT * FROM xml_it WHERE id IN (" + ids + ")";
  </code></pre>
  
  <p>now, if I echo the PHP $sql variable, I get the expected result:</p>
  
  <pre><code>SELECT * FROM table WHERE id IN (3187,3220,3233,3245,3246,3251,3253,3256, ...
  </code></pre>
  
  <p>BUT, with node.js, I am getting this:</p>
  
  <pre><code>SELECT * FROM xml_it WHERE id_xml IN ([0,1,2,3,4, ...
  </code></pre>
  
  <p>The answer['matches'] obviously is the same result (it's basically a Sphinx search result)</p>
  
  <p>Any idea why I am not getting it as a string but as object?</p>
  
  <p>Thanks in advance.</p>