gancl
V2EX  ›  Node.js

mongoose 怎么在子文档的 array 里 update 或 insert?

  •  
  •   gancl · Jun 6, 2014 · 4617 views
    This topic created in 4358 days ago, the information mentioned may be changed or developed.



    这是一个类似iOS game center分数排行榜的数据库, 一个游戏里有多个item项目, 每个项目有多个玩家的分数数据.
    document里包含了subDoc子文档,子文档里又有一个array,怎么找到这个array里的某个值,并对它进行修改?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3348 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 13:59 · PVG 21:59 · LAX 06:59 · JFK 09:59
    ♥ Do have faith in what you're doing.