title: How to get data by query ref object in mongoose
body: <p>I have an issue and failed to find what i am exactly looking for.
  i have this <code>Ads</code> schema with references of others too:</p>
  <pre><code>    link: {
          type: String,
          default: 'n/a',
      },
      page: {
          type: mongoose.Schema.ObjectId,
          ref: 'AdsPage',
          required: true,
      },
      slot: {
          type: mongoose.Schema.ObjectId,
          ref: 'AdsSlot',
          required: true,
      },
  </code></pre>
  <p>and i want to get data by applying condition on <code>page</code> property, <code>page</code> is a schema which has url property in it.
  page schema:</p>
  <pre><code>    {
      title: {
          type: String,
          required: [true, 'Please add page title'],
          unique: true,
          trim: true,
          maxlength: [50, 'Name cannot be more then 50 characters'],
      },
      url: {
          type: String,
          required: [true, 'Add page URL'],
      },
      createdAt: {
          type: Date,
          default: Date.now,
      },
  },
  </code></pre>
  <p>i want to get all ads that matches provided page url.</p>
  <p>my query looks like:</p>
  <pre><code>if (req.params.pageUrl) {
      const ads = await Ads.find({
          'page.url': req.params.pageUrl,
      });
  
      return res.status(200).json({
          success: true,
          message: 'Successfully fetched ads for specific page',
          count: ads.length,
          data: ads,
      });
  }
  </code></pre>
  <p>page url in param is good, but somehow this filter is not working, i got no error but with zero results.
  i have tried <code>$match</code> property but got some upper level error.</p>
  <p>any help on query on nested ref object is much appreciated.</p>