Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   8.0    Statistic  


Adds a string to an array.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
JSON 4.3 Yes Yes Yes Yes Yes

MBS( "JSON.AddStringToArray"; json; value )


Parameter Description Example value
json A JSON text or reference. ["1","2"]
value The new text. "Hello"


Returns JSON code.


Adds a string to an array.
Same as JSON.AddItemToArray, but calls JSON.CreateString automatically for you.

With version 6, you can pass several parameters to add several entries to the array.
When adding to a JSON reference, the function returns that reference number.


Adds a string to an array:

MBS( "JSON.AddStringToArray"; "[\"1\",\"2\",\"3\"]"; "4")

Example result: ["1", "2", "3", "4"]

Adds 4 strings to an array:

MBS( "JSON.AddStringToArray"; "[]"; "1"; "2"; "3"; "4" )

Example result: ["1", "2", "3", "4"]

See also

JSON.AddNumberToObject   -   JSON.AddStringToObject

Feedback: Report problem or ask question.

MBS Xojo blog