title: Passing values to a map function - CouchDB
body: <p>I was wondering whether its possible to pass values to a map function in couchDB design document.</p>
  
  <p><strong>For Example:</strong></p>
  
  <p>In the code below is it possible to pass a value that has been entered by the user and use that value to run the map function. Maybe I can pass users <strong>UserName</strong> when they login and then display the view based on the map function.</p>
  
  <pre><code>function(doc) {
     if(doc.name == data-Entered-By-User) {
     emit(doc.type, doc);
    }
  }
  </code></pre>
  
  <p>Thank you in advance.
  Regards</p>