title: How to populate a v8 array?
body: <p>I have a vector <code>std::vector&lt;std::string&gt; path</code> and I would like to copy it to a <a href="http://izs.me/v8-docs/classv8_1_1Array.html" rel="nofollow noreferrer">v8 array</a> and return it from my function. </p>
  
  <p>I have tried creating a new array </p>
  
  <pre><code>v8::Handle&lt;v8::Array&gt; result;
  </code></pre>
  
  <p>and putting the values from <code>path</code> into <code>result</code> but with no luck. I've also tried several variations of </p>
  
  <pre><code>return scope.Close(v8::Array::New(/* I've tried many things in here */));
  </code></pre>
  
  <p>without success. </p>
  
  <p><a href="https://stackoverflow.com/questions/13282526/how-to-a-return-a-vectort-from-v8-c-function">This</a> is a similar question but I cant seem to duplicate the results.</p>
  
  <p>How do you populate v8 arrays? </p>