Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
JSON.AddStringToArray
Adds a string to an array.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JSON | 4.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "JSON.AddStringToArray"; JSON; Value... ) More
Parameters
Parameter | Description | Example |
---|---|---|
JSON | A JSON text or reference. | ["1","2"] |
Value... | The new text. | "Hello" |
Result
Returns JSON code.
Description
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.
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.
Please repeat Value parameter as often as you need.
Examples
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.AddArrayToArray
- JSON.AddItemToArray
- JSON.AddNumberToArray
- JSON.AddStringToObject
- JSON.CreateArrayRef
- JSON.CreateString
Blog Entries
- Data structures in MBS Plugin
- News about the MBS FileMaker Plugin 10.2
- With JSON in excellent form
- MBS Filemaker Plugin, version 4.3pr8
FileMaker Magazin
This function checks for a license.
Created 26th August 2014, last changed 5th June 2021
