private function processExpr(array $expr)
{
if (count($expr) != 1) {
$newExpr = [];
foreach ($expr as $key => $value) {
$newExpr[] = [$key => $value];
}
$expr = ['$and' => $newExpr];
}
$left = key($expr);
$right = current($expr);
if (substr($left, 0, 1) === '$') {
return $this->parseComposite($left, $right);
}
return $this->parseComparison($left, $right);
}