Buenos días a todos, tengo un pequeño inconveniente, tengo un colección con 
muestro, y deseo crear una consulta que me muestre los datos como en el 
resultado.Intente de muchas formas formas, hasta con map-reduce pero no 
encuentro la solución.

Colección{    “_id”    : “4da2c0e2e999fb56bf000002”,    “nompap” : “papa1”,    
“hijos”  : [                {                 “_id”    : 
“4da2c0e2e999fb56bf000003”,                  “nomhij” : "hijo1",                
},                {                 “_id”    : “4da2c0e2e999fb56bf000004”,      
            “nomhij” : "hijo2",                },                {              
   “_id”    : “4da2c0e2e999fb56bf000005”,                  “nomhij” : "hijo3",  
              }                                     ]}{    “_id”    : 
“4da2c0e2e999fb56bf000006”,    “nompap” : “papa2”,    “hijos”  : [              
  {                 “_id”    : “4da2c0e2e999fb56bf000007”,                  
“nomhij” : "hijo21",                },                {                 “_id”   
 : “4da2c0e2e999fb56bf000008”,                  “nomhij” : "hijo22",            
    }                                    ]}

Resultado{“nompap” : “papa1”,“nomhij” : "hijo1"}{“nompap” : “papa1”,“nomhij” : 
"hijo2"}{“nompap” : “papa1”,“nomhij” : "hijo3"}{“nompap” : “papa2”,“nomhij” : 
"hijo21"}{“nompap” : “papa2”,“nomhij” : "hijo22"}

Saludos;César Céspedes Loayza                                     
_______________________________________________
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/

Responder a