The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.

Add Method

Adds a new property to a JsonObject.

[Ok := ] JsonObject.Add(Key, Value)


 Type: String

 Type: JsonToken | JsonObject | JsonValue | JsonArray | Boolean | Char | Byte | Integer | BigInteger | Decimal | Duration | String | Date | Time | DateTime

Return Value

 Type: Boolean

True if the operation was successful; otherwise, false.

If you omit this optional return value and if the select does not execute successfully, then a run-time error occurs.


The operation will fail if the object already contains a property with the given key.

See Also

HTTP, JSON, TextBuilder, and XML API
Getting Started with AL
Developing Extensions