Cheez
V2EX  ›  Node.js

如何在 Mongoose 里面获取子文档的兄弟?

  •  
  •   Cheez ·
    PRO
    · Feb 5, 2021 · 1971 views
    This topic created in 1988 days ago, the information mentioned may be changed or developed.
    我的子文档的虚拟属性,需要获取同数组的兄弟们的属性,才能够给出值。可以理解为一种特殊的排名,可是该怎么获取呢?
    Cheez
        1
    Cheez  
    OP
    PRO
       Feb 6, 2021
    用 parentArray 同时设立一个 flag 把自己过滤掉
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   999 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: d3e9c8b8 · 36ms · UTC 19:06 · PVG 03:06 · LAX 12:06 · JFK 15:06
    ♥ Do have faith in what you're doing.