[Solved] MongoDB query returns proxy information

Rhys Asks: MongoDB query returns proxy information
I’m trying to filter collections on mongodb but when I check in the console, all that is returned is proxy data that includes a target and handler but I’m not sure what all that means.

Here is my code:

Code:
    async onSubmit() {
      if (this.search !== "") {
        try {
          let bookOrAuthor = await axios.get("http://localhost:3000/Search", {
            method: 'GET',
            headers: { 'Content-Type': 'application/json' },
            params: {
              author: this.search,
              title: this.search
            },
          });
          if (bookOrAuthor) {
            this.filteredBooks = bookOrAuthor.data;
            console.log(this.filteredBooks)
          } else {
            this.$router.push('/Error');
          }
        } catch (err) {
          this.$router.push('/ServerError');
          console.log(`Network error: ${err.message}`);
        }
        this.search = "";
      }
    },
  },
};

In my controller file is this

Code:
exports.list_author_books = async function(req, res) {
  let { author, title } = req.params;
  try {
    let books = await book.find({
      $or: [{ author: author }, { title: title }],
    });
    if (books) {
      res.json(books);
    } else {
      res.status(404).send({ error: "Sorry! Not found." });
    }
  } catch (err) {
    res.status(500).send({ error: "Something went wrong here." });
  }
};

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.