DDCODE

Share programming skills from Magic Oriental

upArrow

Mongoose queries the data as an array, but returns [] when it uses _.intersection () to take the intersection of the two arrays found from.

 May 12, 2019   mongodb, question

The mongoose query returns an array of data, but when using the _.intersection () of underscore to take the intersection of two arrays found in the database, it returns []. Why?

It’s the data problem you found out, it’s an array object, not just an array.

Related Posts:

  • How to quickly find the intersection of two arrays,…
  • Are one-dimensional arrays and two-dimensional…
  • The fields in mongoose query table are arrays to…
  • Elasticsearch uses spring data to aggregate queries,…
  • C language is used to determine that the elements in…
  • Js implements the deduplication of two arrays (one…
  • Mongodb Inline Array Query Question: How to Limit…
  • How does mongoose continue to query from the array…
  • Can C Language Access One-dimensional Arrays in the…
<< Regarding the modeling of mongodb, some people suggest that I change the “brand name” of “goods” from ObjectId to string. Is that okay? Mongodb failed to reconfigure replica set >>

Related Posts:

  • How to quickly find the intersection of two arrays,…
  • Are one-dimensional arrays and two-dimensional…
  • The fields in mongoose query table are arrays to…
  • Elasticsearch uses spring data to aggregate queries,…
  • C language is used to determine that the elements in…
  • Js implements the deduplication of two arrays (one…
  • Mongodb Inline Array Query Question: How to Limit…
  • How does mongoose continue to query from the array…
  • Can C Language Access One-dimensional Arrays in the…

Tags

Android android-studio apache c c++ centos Css css3 Database Docker Eclipse Express Front end git GitHub golang Html html5 Ios java javascript Jquery Laravel linux macos mongodb mysql Nginx node.js npm objective-c php Programmer python redis ruby shell Spring Sql Swift ubuntu vim vue.js Web xcode

Powered by MyWiki WordPress Theme