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

Set Method

Replaces the value at the given index with a new value.

[Ok := ] JsonArray.Set(Index, Value)


 Type: JsonArray

 Type: Integer

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 Index is smaller than 0 or (greater or equal) than JsonArray.Count.

See Also

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