kw_match_simple()

kw_match_simple()#

Check if a JSON object matches a simple key-value pair condition. Works with json_t *.

Prototype

PUBLIC BOOL kw_match_simple(
    json_t      *kw,
    const char  *key,
    const char  *value
);
        

Parameters

Key

Type

Description

kw

json_t *

The JSON object to check.

key

const char *

The key to match in the JSON object.

value

const char *

The value to match for the specified key.


Return Value

Returns TRUE if the key-value pair matches in the JSON object, otherwise returns FALSE.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples