{"title":"JsonArray data type","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/jsonarray/jsonarray-data-type/","by":"JOP-AL","license":"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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/jsonarray/jsonarray-data-type","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Is a container for any well-formed JSON array.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Instance methods","slug":"instance-methods","at":157,"chars":9697},{"level":2,"title":"Related information","slug":"related-information","at":9854,"chars":117}],"text":"> Version: _Available or changed with runtime version 1.0._\nIs a container for any well-formed JSON array. A default JsonArray contains an empty JSON array.\n## Instance methods\nThe following methods are available on instances of the JsonArray data type.\nMethod name|Description\njsonarray-add-jsontoken-method|Adds a new value at the end of the JsonArray.\njsonarray-add-jsonarray-method|Adds a new value at the end of the JsonArray.\njsonarray-add-jsonobject-method|Adds a new value at the end of the JsonArray.\njsonarray-add-jsonvalue-method|Adds a new value at the end of the JsonArray.\njsonarray-add-boolean-method|Adds a new value at the end of the JsonArray.\njsonarray-add-char-method|Adds a new value at the end of the JsonArray.\njsonarray-add-byte-method|Adds a new value at the end of the JsonArray.\njsonarray-add-option-method|Adds a new value at the end of the JsonArray.\njsonarray-add-integer-method|Adds a new value at the end of the JsonArray.\njsonarray-add-biginteger-method|Adds a new value at the end of the JsonArray.\njsonarray-add-decimal-method|Adds a new value at the end of the JsonArray.\njsonarray-add-duration-method|Adds a new value at the end of the JsonArray.\njsonarray-add-date-method|Adds a new value at the end of the JsonArray.\njsonarray-add-time-method|Adds a new value at the end of the JsonArray.\njsonarray-add-datetime-method|Adds a new value at the end of the JsonArray.\nAdd(Text)<jsonarray-add-string-method>|Adds a new value at the end of the JsonArray.\njsonarray-astoken-method|Converts the value in a JsonArray to a JsonToken data type.\njsonarray-clone-method|Creates a deep-copy of the JsonArray value.\njsonarray-count-method|Gets the number of elements in the JsonArray.\nGet(Integer, var JsonToken)<jsonarray-get-method>|Retrieves the value at the given index in the JsonArray.\nGetArray(Integer)<jsonarray-getarray-method>|Retrieves the value at the given index in the JsonArray.\nGetBigInteger(Integer)<jsonarray-getbiginteger-method>|Retrieves the value at the given index in the JsonArray.\nGetBoolean(Integer)<jsonarray-getboolean-method>|Retrieves the value at the given index in the JsonArray.\nGetByte(Integer)<jsonarray-getbyte-method>|Retrieves the value at the given index in the JsonArray.\nGetChar(Integer)<jsonarray-getchar-method>|Retrieves the value at the given index in the JsonArray.\nGetDate(Integer)<jsonarray-getdate-method>|Retrieves the value at the given index in the JsonArray.\nGetDateTime(Integer)<jsonarray-getdatetime-method>|Retrieves the value at the given index in the JsonArray.\nGetDecimal(Integer)<jsonarray-getdecimal-method>|Retrieves the value at the given index in the JsonArray.\nGetDuration(Integer)<jsonarray-getduration-method>|Retrieves the value at the given index in the JsonArray.\nGetInteger(Integer)<jsonarray-getinteger-method>|Retrieves the value at the given index in the JsonArray.\nGetObject(Integer)<jsonarray-getobject-method>|Retrieves the value at the given index in the JsonArray.\nGetOption(Integer)<jsonarray-getoption-method>|Retrieves the value at the given index in the JsonArray.\nGetText(Integer)<jsonarray-gettext-method>|Retrieves the value at the given index in the JsonArray.\nGetTime(Integer)<jsonarray-gettime-method>|Retrieves the value at the given index in the JsonArray.\njsonarray-indexof-jsontoken-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-jsonarray-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-jsonobject-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-jsonvalue-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-boolean-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-char-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-byte-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-option-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-integer-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-biginteger-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-decimal-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-duration-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-date-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-time-method|Determines the index of a specific value in the JsonArray.\njsonarray-indexof-datetime-method|Determines the index of a specific value in the JsonArray.\nIndexOf(Text)<jsonarray-indexof-string-method>|Determines the index of a specific value in the JsonArray.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\njsonarray-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.\nInsert(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.\njsonarray-path-method|Retrieves the JSON path of the array relative to the root of its containing tree.\nReadFrom(Text)<jsonarray-readfrom-string-method>|Reads the JSON data from the string into a JsonArray variable.\njsonarray-readfrom-instream-method|Reads the JSON data from the stream into a JsonArray variable.\nRemoveAt(Integer)<jsonarray-removeat-method>|Removes the token at the given index.\nSelectToken(Text, var JsonToken)<jsonarray-selecttoken-method>|Selects a JsonToken using a JPath expression.\nSelectTokens(Text, var List of [JsonToken])<jsonarray-selecttokens-method>|Selects tokens based on a JPath expression and returns them in a new list.\njsonarray-set-integer-jsontoken-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-jsonobject-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-jsonarray-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-jsonvalue-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-boolean-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-char-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-byte-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-option-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-integer-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-biginteger-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-decimal-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-duration-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-date-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-time-method|Replaces the value at the given index with a new value.\njsonarray-set-integer-datetime-method|Replaces the value at the given index with a new value.\nSet(Integer, Text)<jsonarray-set-integer-string-method>|Replaces the value at the given index with a new value.\nWriteTo(var Text)<jsonarray-writeto-text-method>|Serializes and writes the JSON data of the JsonArray to a given Text object.\njsonarray-writeto-outstream-method|Serializes and writes the JSON data of the JsonArray to a given OutStream object.\n> NOTE\n> 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.\n> NOTE\n> The JsonArray is 0-based by design.\n## Related information\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}