json_list_str_index()

json_list_str_index()#

Find the index of a string in a JSON array. Works with json_t *.

Prototype

PUBLIC int json_list_str_index(
    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 the index of the string in the JSON array, or -1 if not found.

Prototype

// Not applicable in JS

Prototype

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