kw_get_subdict_value()
#
Get the value of a sub-dictionary’s key from a JSON object at a specified path. Works with json_t *
.
Prototype
PUBLIC const char *kw_get_subdict_value(
json_t *kw,
const char *path,
const char *key,
const char *default_value
);
Parameters
Key |
Type |
Description |
---|---|---|
|
The JSON object to query. |
|
|
|
The path to the sub-dictionary. |
|
|
The key in the sub-dictionary to retrieve. |
|
|
The default value to return if the key or subkey does not exist. |
Return Value
Returns the string value of the key in the sub-dictionary, or default_value
if not found.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples