gancl
V2EX  ›  Node.js

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

  •  
  •   gancl · Jun 6, 2014 · 4854 views
    This topic created in 4483 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   ·   Privacy   ·   Solana   ·   5479 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 08:50 · PVG 16:50 · LAX 01:50 · JFK 04:50
    ♥ Do have faith in what you're doing.