kw_delete_subkey()

kw_delete_subkey()#

Delete a subkey from a JSON object at a specified path. Works with json_t *.

Prototype

PUBLIC int kw_delete_subkey(
    json_t      *kw,
    const char  *path,
    const char  *key
);
        

Parameters

Key

Type

Description

kw

json_t *

The JSON object to modify.

path

const char *

The path to the subkey’s parent object.

key

const char *

The subkey to delete from the parent object.


Return Value

Returns 0 on success, or a negative value if the subkey does not exist or deletion fails.

Prototype

// Not applicable in JS

Prototype

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