kwid_match_nid()#
Checks if the given id with a limited size exists in the JSON list, dictionary, or string ids. The comparison is performed up to max_id_size characters.
Prototype
BOOL kwid_match_nid(
hgobj gobj,
json_t *ids,
const char *id,
int max_id_size
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
A handle to the GObj instance, used for logging errors. |
|
|
A JSON object, array, or string containing the IDs to check against. |
|
|
The ID to search for within |
|
|
The maximum number of characters to compare in the |
Return Value
Returns TRUE if the id (up to max_id_size characters) is found in ids, otherwise returns FALSE.
Notes
If ids is an empty object or array, the function returns TRUE. The function supports searching in JSON objects, arrays, and strings.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples