# JsonArray data type
> Version: _Available or changed with runtime version 1.0._
Is a container for any well-formed JSON array. A default JsonArray contains an empty JSON array.
## Instance methods
The following methods are available on instances of the JsonArray data type.
Method name|Description
jsonarray-add-jsontoken-method|Adds a new value at the end of the JsonArray.
jsonarray-add-jsonarray-method|Adds a new value at the end of the JsonArray.
jsonarray-add-jsonobject-method|Adds a new value at the end of the JsonArray.
jsonarray-add-jsonvalue-method|Adds a new value at the end of the JsonArray.
jsonarray-add-boolean-method|Adds a new value at the end of the JsonArray.
jsonarray-add-char-method|Adds a new value at the end of the JsonArray.
jsonarray-add-byte-method|Adds a new value at the end of the JsonArray.
jsonarray-add-option-method|Adds a new value at the end of the JsonArray.
jsonarray-add-integer-method|Adds a new value at the end of the JsonArray.
jsonarray-add-biginteger-method|Adds a new value at the end of the JsonArray.
jsonarray-add-decimal-method|Adds a new value at the end of the JsonArray.
jsonarray-add-duration-method|Adds a new value at the end of the JsonArray.
jsonarray-add-date-method|Adds a new value at the end of the JsonArray.
jsonarray-add-time-method|Adds a new value at the end of the JsonArray.
jsonarray-add-datetime-method|Adds a new value at the end of the JsonArray.
Add(Text)<jsonarray-add-string-method>|Adds a new value at the end of the JsonArray.
jsonarray-astoken-method|Converts the value in a JsonArray to a JsonToken data type.
jsonarray-clone-method|Creates a deep-copy of the JsonArray value.
jsonarray-count-method|Gets the number of elements in the JsonArray.
Get(Integer, var JsonToken)<jsonarray-get-method>|Retrieves the value at the given index in the JsonArray.
GetArray(Integer)<jsonarray-getarray-method>|Retrieves the value at the given index in the JsonArray.
GetBigInteger(Integer)<jsonarray-getbiginteger-method>|Retrieves the value at the given index in the JsonArray.
GetBoolean(Integer)<jsonarray-getboolean-method>|Retrieves the value at the given index in the JsonArray.
GetByte(Integer)<jsonarray-getbyte-method>|Retrieves the value at the given index in the JsonArray.
GetChar(Integer)<jsonarray-getchar-method>|Retrieves the value at the given index in the JsonArray.
GetDate(Integer)<jsonarray-getdate-method>|Retrieves the value at the given index in the JsonArray.
GetDateTime(Integer)<jsonarray-getdatetime-method>|Retrieves the value at the given index in the JsonArray.
GetDecimal(Integer)<jsonarray-getdecimal-method>|Retrieves the value at the given index in the JsonArray.
GetDuration(Integer)<jsonarray-getduration-method>|Retrieves the value at the given index in the JsonArray.
GetInteger(Integer)<jsonarray-getinteger-method>|Retrieves the value at the given index in the JsonArray.
GetObject(Integer)<jsonarray-getobject-method>|Retrieves the value at the given index in the JsonArray.
GetOption(Integer)<jsonarray-getoption-method>|Retrieves the value at the given index in the JsonArray.
GetText(Integer)<jsonarray-gettext-method>|Retrieves the value at the given index in the JsonArray.
GetTime(Integer)<jsonarray-gettime-method>|Retrieves the value at the given index in the JsonArray.
jsonarray-indexof-jsontoken-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-jsonarray-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-jsonobject-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-jsonvalue-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-boolean-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-char-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-byte-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-option-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-integer-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-biginteger-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-decimal-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-duration-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-date-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-time-method|Determines the index of a specific value in the JsonArray.
jsonarray-indexof-datetime-method|Determines the index of a specific value in the JsonArray.
IndexOf(Text)<jsonarray-indexof-string-method>|Determines the index of a specific value in the JsonArray.
jsonarray-insert-integer-jsontoken-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-jsonarray-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-jsonobject-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-jsonvalue-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-boolean-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-char-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-byte-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-option-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-integer-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-biginteger-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-decimal-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-duration-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-date-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-time-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-insert-integer-datetime-method|Inserts the value at the given index in the array while shifting all the values to the right by one position.
Insert(Integer, Text)<jsonarray-insert-integer-string-method>|Inserts the value at the given index in the array while shifting all the values to the right by one position.
jsonarray-path-method|Retrieves the JSON path of the array relative to the root of its containing tree.
ReadFrom(Text)<jsonarray-readfrom-string-method>|Reads the JSON data from the string into a JsonArray variable.
jsonarray-readfrom-instream-method|Reads the JSON data from the stream into a JsonArray variable.
RemoveAt(Integer)<jsonarray-removeat-method>|Removes the token at the given index.
SelectToken(Text, var JsonToken)<jsonarray-selecttoken-method>|Selects a JsonToken using a JPath expression.
SelectTokens(Text, var List of [JsonToken])<jsonarray-selecttokens-method>|Selects tokens based on a JPath expression and returns them in a new list.
jsonarray-set-integer-jsontoken-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-jsonobject-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-jsonarray-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-jsonvalue-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-boolean-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-char-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-byte-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-option-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-integer-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-biginteger-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-decimal-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-duration-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-date-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-time-method|Replaces the value at the given index with a new value.
jsonarray-set-integer-datetime-method|Replaces the value at the given index with a new value.
Set(Integer, Text)<jsonarray-set-integer-string-method>|Replaces the value at the given index with a new value.
WriteTo(var Text)<jsonarray-writeto-text-method>|Serializes and writes the JSON data of the JsonArray to a given Text object.
jsonarray-writeto-outstream-method|Serializes and writes the JSON data of the JsonArray to a given OutStream object.
> NOTE
> For performance reasons all HTTP, JSON, TextBuilder, and XML types are reference types, not value types. Reference types holds a pointer to the data elsewhere in memory, whereas value types store its own data.
> NOTE
> The JsonArray is 0-based by design.
## Related information
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/jsonarray/jsonarray-data-type, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/jsonarray/jsonarray-data-type/
