Skip to content

MTY_JSONObjSetItem

chrisd1100 edited this page Aug 25, 2022 · 2 revisions

Set an item in an MTY_JSON object.

This function will replace an existing key with the same name.

bool MTY_JSONObjSetItem(
    MTY_JSON *   json,
    const char * key,
    MTY_JSON *   value
);

Parameters

json (MTY_JSON *)

An MTY_JSON object.

key (const char *)

Key to set.

value (MTY_JSON *)

Value associated with key.

Return value

bool

Returns true if value was set successfully, otherwise false.

Platform support

Windows   macOS   Android   Linux   Web  

See also

Module: JSON

Clone this wiki locally