title: jQuery when output the promise object rather than result
body: <p>I want to get the count of each database in the PouchDB. When I tried to wrap it in the jQuery promise, when it's complete it send the promise object instead of result to the then();</p>
  
  <pre><code>function validateAppData(event) {
  
          var db1 = new PouchDB( "distributors" );
          var db2 = new PouchDB( "categories" );
          var db3 = new PouchDB( "genericTypes" );
          var db4 = new PouchDB( "products" );
  
          $.when(
              db1.info(),
              db2.info(),
              db3.info(),
              db4.info()
          ).then( function( distributors, categories, genericTypes, products ) {
              console.log(distributors);
              console.log(categories);
              console.log(genericTypes);
              console.log(products);
              console.log("all done")
              console.log(distributors.doc_count);
          } );
      }
  </code></pre>
  
  <p><strong>The console output as follow.</strong> </p>
  
  <p><a href="https://i.stack.imgur.com/S96E1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S96E1.png" alt="enter image description here"></a></p>
  
  <p>Please let me know how can I get the response in each object.</p>
  
  <p>Thank you.</p>