def METHOD_NAME(object, value, namedValues={}):
    if isinstance(value, dict):
        for key in list(value.keys()):
            if isinstance(key, RegexType):
                temp = None
                for key2 in list(object.keys()):
                    # Find a key that match the Regex pattern!
                    match = key.match(key2)
                    if match is not None:
                        # For named-capture we compare values
                        # with the values available in params!
                        if not JsonUtils.checkDictionary(
                            match.groupdict(None), namedValues
                        ):
                            break
                        temp = object.get(key2, None)
                        break
            else:
                temp = object.get(key, None)
            # If temp is not None, then a match in json dictionary was
            # found!
            if temp is None or not JsonUtils.METHOD_NAME(
                temp, value[key], namedValues
            ):
                return False
        return True
    elif isinstance(value, RegexType):
        # The compare is performed with a Regex object!
        match = value.match(object)
        if match is None or not JsonUtils.checkDictionary(
            match.groupdict(None), namedValues
        ):
            return False
        return True
    elif JsonUtils.compareValue(value, object):
        return True
    return False