title: How to modify array on NodeJS
body: <p><strong>this is my array in model file,</strong></p>
  
  <pre><code>var genres = [
    "Action",
    "Comedy",
    "Documentary"
  ];
  </code></pre>
  
  <p><strong>I need to return(res.send) like this,</strong></p>
  
  <pre><code> [
        { label: "Action", value: 1 },
        { label: "Comedy", value: 2 },
        { label: "Documentary", value: 3 },
        { label: "Drama", value: 4 }
     ];
  </code></pre>
  
  <p><strong>I wrote get a request like this,</strong></p>
  
  <pre><code>router.get("/genre", (req, res, next) =&gt; {
    try {
      let genre = MovieModel.genres;
      res.send(genre);
    } catch (e) {
      return res.send(e.message);
    }
  });
  </code></pre>