ご挨拶、
私は次のMongoDBオブジェクトを持っています:
{
"_id": ObjectId("4d0e28938b012fe28754715a"),
"notifications": {
"0": {
"type": "privateMessage",
"fromUname": "Eamorr2",
"time": 1292773522,
"id": "1lfw70h789u13a1e67pv"
},
"1": {
"type": "privateMessage",
"fromUname": "Eamorr2",
"time": 1292773522,
"id": "iwoidjsoskqp23nlwof"
}
},
"toUname": "Eamorr"
}
要素0を削除しようとしています。
{
"_id": ObjectId("4d0e28938b012fe28754715a"),
"notifications": {
"0": {
"type": "privateMessage",
"fromUname": "Eamorr2",
"time": 1292773522,
"id": "iwoidjsoskqp23nlwof"
}
},
"toUname": "Eamorr"
}
これが私が(PHPで)sofarを試したものですが、役に立ちませんでした:
$customerNotifications->update(array('toUname'=>$uname),array('$pull'=>array('notifications'=>$key)));
しかし、それは機能しておらず、私は今完全に立ち往生しています。
どんな助けでも大歓迎です。前もって感謝します、