SysUpdatePropertyJson
Updates the named global property with the given json value. Note that the property must already be created for the app.
Service | Operation |
---|---|
globalApp | SYS_UPDATE_PROPERTY_JSON |
Method Parameters
Parameter | Description |
---|---|
name | The name of the property to update |
value | The JSON value to set the property to |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var globalAppProxy = bridge.getGlobalAppServiceProxy();
var propertyName = "initialHealth";
var jsonValue = {};
jsonValue.health = 6;
jsonValue.regen = 1;
var postResult = globalAppProxy.sysUpdatePropertyJson( propertyName, jsonValue );
if (postResult.status == 200) {
// Success!
}
{
"service": "globalApp",
"operation": "SYS_UPDATE_PROPERTY_JSON",
"data": {
"name": "initialHealth",
"value": {
"health": 6,
"regen": 1
}
}
}
JSON Response
{
"status": 200,
"data": null
}