kw_find_json_in_list()

kw_find_json_in_list()#

Search for a JSON object in a JSON array. Works with json_t *.

Prototype

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

Parameters

Key

Type

Description

kw

json_t *

The JSON array to search.

key

const char *

The key to match in the objects within the array.

value

const char *

The value to match for the specified key.


Return Value

Returns a pointer to the first JSON object in the array that matches the key-value pair, or NULL if not found.

Prototype

// Not applicable in JS

Prototype

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