kwid_compare_lists()

kwid_compare_lists()#

Compare two JSON arrays (lists) of objects based on their kwid fields. Works with json_t *.

Prototype

PUBLIC int kwid_compare_lists(
    json_t      *list1,
    json_t      *list2
);
        

Parameters

Key

Type

Description

list1

json_t *

The first JSON array to compare.

list2

json_t *

The second JSON array to compare.


Return Value

Returns 0 if the lists are equal, a positive value if list1 is greater, or a negative value if list2 is greater.

Prototype

// Not applicable in JS

Prototype

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