![]() |
nRF Connect SDK API 3.3.99
|
| int nrf_cloud_obj_object_add | ( | struct nrf_cloud_obj *const | obj, |
| const char *const | key, | ||
| struct nrf_cloud_obj *const | obj_to_add, | ||
| const bool | data_child ) |
#include <include/net/nrf_cloud_codec.h>
Add a key string and object to the provided object.
If successful, obj_to_add will be reset with nrf_cloud_obj_reset since its data has been moved to obj.
| [out] | obj | Object to contain key and object. |
| [in] | key | Key string; must be valid and constant for the life of the object. |
| [in] | obj_to_add | Object. |
| [in] | data_child | If true, key and value will be added as a child to a "data" object. If false, key and value will be added as a child to the provided object. |
| -EINVAL | Invalid parameter. |
| -ENOENT | Object is not initialized. |
| -ENOMEM | Out of memory. |
| -ENOTSUP | Action not supported for the object's type. |
| 0 | Success; item added. |