V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Cheez
V2EX  ›  Node.js

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

  •  
  •   Cheez ·
    PRO
    · Feb 5, 2021 · 1834 views
    This topic created in 1911 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   ·   1302 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 16:55 · PVG 00:55 · LAX 09:55 · JFK 12:55
    ♥ Do have faith in what you're doing.