json_str_in_list()

json_str_in_list()#

Check if a string exists in a JSON array of strings. Works with json_t *.

Prototype

PUBLIC BOOL json_str_in_list(
    json_t      *jn_list,
    const char  *string
);
        

Parameters

Key

Type

Description

jn_list

json_t *

The JSON array to search.

string

const char *

The string to find in the array.


Return Value

Returns TRUE if the string exists in the JSON array, otherwise returns FALSE.

Prototype

// Not applicable in JS

Prototype

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