title: Using multiple parameters in URL in express
body: <p>I am using Express with Node and I have a requirement in which the user can request the URL as: <code>http://myhost/fruit/apple/red</code>.  </p>
  
  <p>Such a request will return a JSON response.  </p>
  
  <p>The JSON data, before the above call looks like:  </p>
  
  <pre><code>{
      "fruit": {
          "apple": "foo"
      }
  }  
  </code></pre>
  
  <p>With the above request, the response JSON data should be:  </p>
  
  <pre><code>{
      "apple": "foo",
      "color": "red"
  }
  </code></pre>
  
  <p>I have configured express to route as follows:  </p>
  
  <pre><code>app.get('/fruit/:fruitName/:fruitColor', function(request, response) {
      /*return the response JSON data as above using request.params.fruitName and 
  request.params.fruitColor to fetch the fruit apple and update its color to red*/
      });  
  </code></pre>
  
  <p>But this does not work. I am unsure of how to pass multiple parameters, that is, I am unsure if <code>/fruit/:fruitName/:fruitColor</code> is the correct way to do this. Is it?</p>