MongoDB PHP iç içe belgeler

0 Cevap php

Tamam benim tv veritabanında bu koleksiyona sahip Diyelim

"season" : "1", "episodes" : {"code" : ["1x01", "1x02", "1x03"], "title" : ["Dont Look Back", "Genesis", "Third"]},
"season" : "2", "episodes" : {"code" : ["2x01", "2x02", "2x03"], "title" : ["D2ont Look Back", "G2enesis", "T2hird"]},
"season" : "3", "episodes" : {"code" : ["3x01", "3x02", "3x03"], "title" : ["D3ont Look Back", "G3enesis", "T3hird"]},
"season" : "4", "episodes" : {"code" : ["4x01", "4x02", "4x03"], "title" : ["D4ont Look Back", "G4enesis", "T4hird"]}

how do i make it so that only, lets say the episodes from season 2 are shown? ive been trying using
echo $obj['episodes']['code'][0];
but it only shows episodes from the last row

oldukça emin im benim yuvalama hepsi yanlış ama sorun bu haritaya çalışıyorum zorunda Mongo yeni ve im im

herhangi bir tavsiye?

0 Cevap