Query two level data with $or operation

Hi, I think you want a $or, not a $and (and means both conditions must be true):

    $match: {  
      $or: [  
        { "warehouseParent": "A" },  
        { "instock.warehouse": "A" }  
      ]  
    }