public function where($key = false, $desiredValue, $op = "==")
    {
        $collection = $this->getIterator();
        $subset = new Collection();

        foreach($collection as $prop => $result) {
            // Grab resource value
            $realValue = $result;
            if (is_object($result)) {
                $realValue = $result->$key;
            }
            else if (is_array($result)) {
                $realValue = $result[$key];
            }

            // Check value against operator given
            $add = false;
            if ($op == '==' && $realValue == $desiredValue) {
                $add = true;
            }
            else if ($op == '>=' && $realValue >= $desiredValue) {
                $add = true;
            }
            else if ($op == '<=' && $realValue <= $desiredValue) {
                $add = true;
            }
            else if ($op == '>' && $realValue > $desiredValue) {
                $add = true;
            }
            else if ($op == '<' && $realValue < $desiredValue) {
                $add = true;
            }
            else if ($op == '===' && $realValue === $desiredValue) {
                $add = true;
            }
            else if ($op == '!=' && $realValue != $desiredValue) {
                $add = true;
            }

            // Add the resource to the subset if valid
            if ($add) {
                $subset->add($result, $prop);
            }
        }
        return $subset;
    }