Cheez
V2EX  ›  Node.js

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

  •  
  •   Cheez ·
    PRO
    · Feb 5, 2021 · 1922 views
    This topic created in 1964 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   ·   3043 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 14:36 · PVG 22:36 · LAX 07:36 · JFK 10:36
    ♥ Do have faith in what you're doing.