kw_pop()

kw_pop()#

Remove a key from a JSON object and return its value. Works with json_t *.

Prototype

PUBLIC json_t *kw_pop(
    json_t      *kw,
    const char  *key
);
        

Parameters

Key

Type

Description

kw

json_t *

The JSON object to modify.

key

const char *

The key to remove from the JSON object.


Return Value

Returns the value associated with the removed key, or NULL if the key does not exist.

Prototype

// Not applicable in JS

Prototype

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