title: How to get all data matched each record from mongodb using mongoose and nodejs
body: <p>Tried to get value of product_name from my mongodb using mongoose but i do not know how to do it.</p>
  
  <p>My DB Data collection:</p>
  
  <pre><code>{
  _id:ObjectId("5ecea02ebb6f3c19e86fe805"),
  product_name:"Test1"
  },
  {
  _id:ObjectId("5ecea02ebb6f3c19e86fe806"),
  product_name:"Test2"
  },
  {
  _id:ObjectId("5ecea02ebb6f3c19e86fe807"),
  product_name:"Test3"
  },
  {
  _id:ObjectId("5ecea02ebb6f3c19e86fe808"),
  product_name:"Test4"
  },
  {
  _id:ObjectId("5ecea02ebb6f3c19e86fe809"),
  product_name:"Test5"
  }
  </code></pre>
  
  <p>data.controller.js:</p>
  
  <pre><code>module.exports.getData = (req, res, next) =&gt; { 
  var tableCate = mongoose.model("Product"); 
      tableCate.find({ product_name }, function(err, docs) {
      if (err) {
          console.log( err);
          return
      } else {
          console.log(docs)// output should be Test1,Test2,Test3,Test4,Test5
       }
      });
  </code></pre>