title: ObjectId converting to strings in api, nodejs to reactjs
body: <p>I have a simple API, that sends data in a response</p>
  
  <pre><code>Food.aggregate([{
      $match: {
          res_id: restaurant._id
      }
  }, {
      $group: {
          _id: "$category",
          foods: {
              $push: "$$ROOT"
          }
      }
  }], function(err, foods) {
  
      if (err)
          res.json({
              error: "error"
          });
      else
          res.json(foods);
  
  });
  </code></pre>
  
  <p>However, when I read the data using <code>axios</code> in my React app, The <code>objectIds</code> get converted to strings in my front end React app.</p>
  
  <p>Now I could not find any resource on the type of data types that can be passed over HTTP or any other restrictions. Can anyone point me to any resource or tell me if this is the way HTTP works. </p>