title: 3 MongoDB Collections, 3 AJAX Requests: How to simplify into 1 request?
body: <p>I have 3 MongoDB collections and each of them are defined something like:</p>
  
  <pre><code>@app.route('/getMyData', methods=['GET'])
  def getMyData():
      myDataCollection = db["data_1"]
      data = list(myDataCollection.find({},{"Name":1,"Website":1,"Twitter":1,"Description":1,"_id":0}))
      return jsonify(data=data)
  </code></pre>
  
  <p>Then I retrieve these data using AJAX requests (one for each collection so 3 requests) as follows:</p>
  
  <pre><code>function getDataFromDB() {
      $.ajax({
          url: '/getMyData',
          type: 'GET',
          contentType: 'application/json; charset=utf-8',
          dataType: 'json',
          async: false,
          success: function (data) {
               // code goes here
          }
      });
  }
  </code></pre>
  
  <p>How can I simplify this? It seems like I cannot query multiple collections in MongoDB.</p>