Add a named property on the JSON object. Fails if the object already contains a property by the same name.
This viper method also supports the extension viper syntax.
Syntax
Smartsite SXML | Copy Code |
---|---|
this.add(string name, string jsonValue) this.add(string name, string jsonValue, enum type) |
Extension Viper Syntax
Smartsite SXML | Copy Code |
---|---|
page.<id>.add(string name, string jsonValue) page.<id>.add(string name, string jsonValue, enum type) |
Parameters
Name | Data Type | Description |
---|---|---|
name | String | The name of the property. |
value | Any | The value. |
jsonValue | String | The JSON value. Will be parsed to determine the JSON type. |
type | Enum |
Type to which the jsonValue will be converted.
Enum values:
|
Return Value
None.
Used in
Macro | Description |
---|---|
Json | The JSON macro can parse a JSON string. It exposes properties to query the resulting object and methods to modify it. |