title: why does this get method returning this message?
body: <p>I have this function that tabulates the user specific data. Its a get method that sends a query parameter userId:</p>
  <pre><code>&lt;script&gt;
              let thisArray = []
              let = userId = $('#userId').val();
  
              $.ajax({
                  method:'GET',
                  url:'/auth/marcacoesGET/:userId',
                  dataType: 'json',
                  data: {
                      userId: userId
                  },
                  success:function(marcacao){
                      thisArray = marcacao
                      buildTable(thisArray);
                      console.log(thisArray)      
                  }
              })
  
              function buildTable(marcacao){
                  let table = document.getElementById('tabelaCliente')
  
                  for(let i = 0; i &lt; marcacao.length; i++){
                      let row = `&lt;tr&gt;
                                      &lt;td&gt;${marcacao[i].address}&lt;/td&gt;
                                      &lt;td&gt;${marcacao[i].date}&lt;/td&gt;
                                      &lt;td&gt;${marcacao[i].hour}&lt;/td&gt;
                                      &lt;td&gt;${marcacao[i].type}&lt;/td&gt;
                                      &lt;td&gt;${marcacao[i].state}&lt;/td&gt;
                                 &lt;/tr&gt;`
                      table.innerHTML += row
                  }
              }
          &lt;/script&gt;
  </code></pre>
  <p>I want this function to pass the userId to this get method:</p>
  <p>This is a route</p>
  <pre><code>router.get('/marcacoesGET/:userId', authControllerMarcacao.getMarcacoes);
  </code></pre>
  <p>and this is the get method.</p>
  <pre><code>exports.getMarcacoes = async(req, res) =&gt; {
      
      const { userId } = req.params;
      try {
          const user = await User.findById({_id : userId}).populate('marcacaoCliente');
          console.log('user', user);
          res.status(200).json(user.marcacaoCliente);
      } catch (err) {
          res.json({message:err});
      }
  </code></pre>
  <p>And I got this weird message on the browser console, IDK if it's an error or not:</p>
  <pre><code>Object { message: {…} }
  ​
  message: Object { stringValue: &quot;\&quot;{ _id: ':userId' }\&quot;&quot;, kind: &quot;ObjectId&quot;, path: &quot;_id&quot;, … }
  ​​
  kind: &quot;ObjectId&quot;
  ​​
  path: &quot;_id&quot;
  ​​
  reason: Object {  }
  ​​
  stringValue: &quot;\&quot;{ _id: ':userId' }\&quot;&quot;
  ​​
  value: Object { _id: &quot;:userId&quot; }
  ​​
  &lt;prototype&gt;: Object { … }
  ​
  &lt;prototype&gt;: Object { … }
  ​​
  __defineGetter__: function __defineGetter__()
  ​​
  __defineSetter__: function __defineSetter__()
  ​​
  __lookupGetter__: function __lookupGetter__()
  ​​
  __lookupSetter__: function __lookupSetter__()
  ​​
  __proto__: 
  ​​
  constructor: function Object()
  ​​
  hasOwnProperty: function hasOwnProperty()
  ​​
  isPrototypeOf: function isPrototypeOf()
  ​​
  propertyIsEnumerable: function propertyIsEnumerable()
  ​​
  toLocaleString: function toLocaleString()
  ​​
  toString: function toString()
  ​​
  valueOf: function valueOf()
  ​​
  &lt;get __proto__()&gt;: function __proto__()
  ​​
  &lt;set __proto__()&gt;: function __proto__()
  </code></pre>
  <p>If you need more info pls tell</p>