Component: JSON 
----------------

Parse or build JSON texts.

| Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|
| [2.7](newinversion27.md "First functions introduced with version 2.7.") / [16.2](newinversion162.md "Newest functions in version 16.2.") | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ 97% |

  
| Item | Details |
|:--|:--|
| [Dictionary.ToJSON](DictionaryToJSON.md)   Returns JSON representation of dictionary for data exchange. | All   6.1 |
| [FM.SQL.JSONColumn](FMSQLJSONColumn.md)   Returns a column as JSON array. | All   10.5 |
| [FM.SQL.JSONRecord](FMSQLJSONRecord.md)   Returns a row as JSON object. | All   8.1 |
| [FM.SQL.JSONRecords](FMSQLJSONRecords.md)   Returns rows as JSON array. | All   8.1 |
| [JSON.AddArrayToArray](JSONAddArrayToArray.md)   Adds an array to an existing array. | All   10.2 |
| [JSON.AddBooleanToObject](JSONAddBooleanToObject.md)   Adds a boolean value to an array. | All   6.0 |
| [JSON.AddFalseToObject](JSONAddFalseToObject.md)   Adds a new entry to the object with the given name and a boolean false value. | All   2.7 |
| [JSON.AddItemToArray](JSONAddItemToArray.md)   Adds an item to an array. | All   2.7 |
| [JSON.AddItemToObject](JSONAddItemToObject.md)   Adds a new entry to the object with the given name and value. | All   2.7 |
| [JSON.AddNullToObject](JSONAddNullToObject.md)   Adds a new entry to the object with the given name and a null value. | All   2.7 |
| [JSON.AddNumberToArray](JSONAddNumberToArray.md)   Adds a number to an array. | All   4.3 |
| [JSON.AddNumberToObject](JSONAddNumberToObject.md)   Adds a new entry to the object with the given name and value. | All   2.7 |
| [JSON.AddStringToArray](JSONAddStringToArray.md)   Adds a string to an array. | All   4.3 |
| [JSON.AddStringToObject](JSONAddStringToObject.md)   Adds a new entry to the object with the given name and value. | All   2.7 |
| [JSON.AddTrueToObject](JSONAddTrueToObject.md)   Adds a new entry to the object with the given name and a boolean true value. | All   2.7 |
| [JSON.AddValueToArray](JSONAddValueToArray.md)   Adds a value to an array. | All   14.1 |
| [JSON.AddValueToObject](JSONAddValueToObject.md)   Adds a new entry to the object with the given name and value. | All   14.1 |
| [JSON.ArraySlice](JSONArraySlice.md)   Slices a JSON array. | All   15.0 |
| [JSON.ClearVariables](JSONClearVariables.md)   Clears the variables. | All   15.0 |
| [JSON.Clone](JSONClone.md)   Creates a clone of the json. | All   6.1 |
| [JSON.Colorize](JSONColorize.md)   Formats a JSON string with color. | All   8.2 |
| [JSON.Compact](JSONCompact.md)   Returns compact unformatted JSON for the given JSON text. | All   2.7 |
| [JSON.CreateArray](JSONCreateArray.md)   Creates new array. | All   2.7 |
| [JSON.CreateArrayRef](JSONCreateArrayRef.md)   Creates empty array reference. | All   6.0 |
| [JSON.CreateBoolean](JSONCreateBoolean.md)   Creates a boolean node with given value. | All   6.0 |
| [JSON.CreateDoubleArray](JSONCreateDoubleArray.md)   Creates a new JSON with a double array with given values. | All   2.7 |
| [JSON.CreateFalse](JSONCreateFalse.md)   Creates a boolean node with false value. | All   2.7 |
| [JSON.CreateIntegerArray](JSONCreateIntegerArray.md)   Creates a new JSON with an integer array with given values. | All   4.3 |
| [JSON.CreateNull](JSONCreateNull.md)   Creates a new NULL entry. | All   2.7 |
| [JSON.CreateNumber](JSONCreateNumber.md)   Creates a new JSON encoded number. | All   2.7 |
| [JSON.CreateObject](JSONCreateObject.md)   Creates a new empty object node. | All   2.7 |
| [JSON.CreateObjectRef](JSONCreateObjectRef.md)   Creates empty object reference. | All   6.0 |
| [JSON.CreateString](JSONCreateString.md)   Creates a string node with given text. | All   2.7 |
| [JSON.CreateStringArray](JSONCreateStringArray.md)   Creates a new JSON with a string array with given values. | All   2.7 |
| [JSON.CreateStringArrayWithList](JSONCreateStringArrayWithList.md)   Creates a new JSON with a string array with given values. | All   4.1 |
| [JSON.CreateTrue](JSONCreateTrue.md)   Creates a boolean node with true value. | All   2.7 |
| [JSON.CreateValue](JSONCreateValue.md)   Creates a new value. | All   9.0 |
| [JSON.CurrentMatch](JSONCurrentMatch.md)   Queries JSON for current match in JSON.ReplaceEvaluate function. | All   14.2 |
| [JSON.CurrentMatchPath](JSONCurrentMatchPath.md)   Queries JSON for current match path in JSON.ReplaceEvaluate function. | All   14.2 |
| [JSON.DeleteItemFromArray](JSONDeleteItemFromArray.md)   Deletes an item from an array. | All   2.7 |
| [JSON.DeleteItemFromObject](JSONDeleteItemFromObject.md)   Deletes item from an object. | All   2.7 |
| [JSON.DeleteRecord](JSONDeleteRecord.md)   Deletes an existing record in a table in one line using JSON. | All   14.4 |
| [JSON.DeleteRecords](JSONDeleteRecords.md)   Deletes existing records in a table in one line using JSON. | All   14.4 |
| [JSON.EqualContent](JSONEqualContent.md)   Checks if two JSON are equal in content. | All   10.0 |
| [JSON.Equals](JSONEquals.md)   Checks if two JSON are equal. | All   9.0 |
| [JSON.FilterObjectArray](JSONFilterObjectArray.md)   Filters JSON object array to find matching entries. | All   13.3 |
| [JSON.FindValueInArray](JSONFindValueInArray.md)   Queries index of value in array. | All   9.0 |
| [JSON.FindValueInObjectArray](JSONFindValueInObjectArray.md)   Queries index of value in object array. | All   9.0 |
| [JSON.Flatten](JSONFlatten.md)   Flattens a json object or array to a single depth object of key-value pairs. | All   13.5 |
| [JSON.Format](JSONFormat.md)   Returns pretty printed JSON for the given JSON text. | All   4.4 |
| [JSON.FromToon](JSONFromToon.md)  **New in 16.2**    Converts TOON to JSON. | All   16.2 |
| [JSON.GetArrayItem](JSONGetArrayItem.md)   Queries entry from array with given index. | All   2.7 |
| [JSON.GetArrayItems](JSONGetArrayItems.md)   Queries entries from JSON array. | All   10.4 |
| [JSON.GetArrayItemsAsList](JSONGetArrayItemsAsList.md)   Queries a list of all array entries. | All   4.2 |
| [JSON.GetArrayItemsAsQuickList](JSONGetArrayItemsAsQuickList.md)   Queries array values as QuickList. | All   13.3 |
| [JSON.GetArrayPathItems](JSONGetArrayPathItems.md)   Queries value from JSON path in array of objects. | All   7.1 |
| [JSON.GetArraySize](JSONGetArraySize.md)   Queries the number of array entries. | All   2.7 |
| [JSON.GetBooleanValue](JSONGetBooleanValue.md)   Queries boolean value for JSON. | All   10.3 |
| [JSON.GetDoubleValue](JSONGetDoubleValue.md)   Queries a floating point value of the JSON node. | All   2.7 |
| [JSON.GetIntegerValue](JSONGetIntegerValue.md)   Queries integer value of the JSON node. | All   2.7 |
| [JSON.GetObjectItem](JSONGetObjectItem.md)   Queries named item from an object. | All   2.7 |
| [JSON.GetObjectItemTree](JSONGetObjectItemTree.md)   Queries named item from an object tree. | All   3.2 |
| [JSON.GetObjectItemTreeRef](JSONGetObjectItemTreeRef.md)   Queries named item from an object tree. | All   6.0 |
| [JSON.GetObjectName](JSONGetObjectName.md)   Queries name of item in an object. | All   4.0 |
| [JSON.GetObjectNameList](JSONGetObjectNameList.md)   Queries names of items in an object. | All   4.0 |
| [JSON.GetObjectSize](JSONGetObjectSize.md)   Queries the number of object items. | All   4.0 |
| [JSON.GetPathItem](JSONGetPathItem.md)   Queries value from JSON path. | All   6.1 |
| [JSON.GetStringValue](JSONGetStringValue.md)   Queries string value of the JSON node. | All   2.7 |
| [JSON.GetType](JSONGetType.md)   Queries type of json object. | All   2.7 |
| [JSON.GetValue](JSONGetValue.md)   Queries the value of the json. | All   6.1 |
| [JSON.Import](JSONImport.md)   Imports JSON and creates tables, fields and records. | All   5.4 |
| [JSON.Import.Cancel](JSONImportCancel.md)   Cancels current import. | All   5.4 |
| [JSON.Import.ErrorCount](JSONImportErrorCount.md)   Queries error counter. | All   9.3 |
| [JSON.Import.Errors](JSONImportErrors.md)   Queries list of error messages. | All   9.3 |
| [JSON.Import.SetBaseFields](JSONImportSetBaseFields.md)   Sets the names of the base fields per record. | All   14.2 |
| [JSON.Import.SetExtraField](JSONImportSetExtraField.md)   Sets the extra field to add to all tables. | All   14.2 |
| [JSON.Import.Status](JSONImportStatus.md)   Queries status of xml import. | All   5.4 |
| [JSON.Import.Todo](JSONImportTodo.md)   Queries how many items are to be done for XML import. | All   5.4 |
| [JSON.Import.Total](JSONImportTotal.md)   Queries total items to be imported. | All   5.4 |
| [JSON.Import.Work](JSONImportWork.md)   Performs import. | All   5.4 |
| [JSON.InsertOrUpdateRecord](JSONInsertOrUpdateRecord.md)   Inserts or updates a record in a table in one line using JSON. | All   14.4 |
| [JSON.InsertRecord](JSONInsertRecord.md)   Inserts a new record in a table in one line using JSON. | All   14.4 |
| [JSON.InsertRecords](JSONInsertRecords.md)   Inserts multiple records in a table in one line using JSON. | All   14.5 |
| [JSON.IsValid](JSONIsValid.md)   Checks if JSON text is valid. | All   6.3 |
| [JSON.JSONPatch.ApplyPatch](JSONJSONPatchApplyPatch.md)   Applies a patch to a json document. | All   14.0 |
| [JSON.JSONPatch.FromDiff](JSONJSONPatchFromDiff.md)   Create a JSON Patch from a diff of two json documents. | All   14.0 |
| [JSON.List](JSONList.md)   Lists all IDs of current JSON objects. | All   12.5 |
| [JSON.Merge](JSONMerge.md)   Merges multiple JSON objects or arrays. | All   14.2 |
| [JSON.MergePatch.ApplyPatch](JSONMergePatchApplyPatch.md)   Applies a merge patch to a json document. | All   14.0 |
| [JSON.MergePatch.FromDiff](JSONMergePatchFromDiff.md)   Create a JSON Merge Patch from a diff of two json documents. | All   14.0 |
| [JSON.Parse](JSONParse.md)   Parses JSON text and return reference number. | All   6.0 |
| [JSON.Query](JSONQuery.md)   Performs a JSON Path query. | All   13.5 |
| [JSON.Release](JSONRelease.md)   Frees a json reference number. | All   6.0 |
| [JSON.ReleaseAll](JSONReleaseAll.md)   Releases all JSON objects. | All   6.0 |
| [JSON.Replace](JSONReplace.md)   Searches for all values that match the JSONPath expression and replaces them with the specified value. | All   13.5 |
| [JSON.ReplaceEvaluate](JSONReplaceEvaluate.md)   Searches for all values that match the JSONPath expression and replaces them with the result of the evaluation. | All   14.2 |
| [JSON.ReplaceItemInArray](JSONReplaceItemInArray.md)   Replaces an item in an array with new item. | All   4.3 |
| [JSON.ReplaceItemInObject](JSONReplaceItemInObject.md)   Replaces an item in an object with new item. | All   4.3 |
| [JSON.Search](JSONSearch.md)   Performs a JMESPath query. | All   13.5 |
| [JSON.SetFormatOptions](JSONSetFormatOptions.md)   Sets options for formatting JSON. | All   16.0 |
| [JSON.SetPathItem](JSONSetPathItem.md)   Sets a value in a JSON hierarchy. | All   6.1 |
| [JSON.SetVariables](JSONSetVariables.md)   Creates local variables in script for JSON. | All   15.0 |
| [JSON.Sort](JSONSort.md)   Sorts the JSON array/object. | All   9.3 |
| [JSON.SortWithEvaluate](JSONSortWithEvaluate.md)   Sorts the JSON array/object using an expression to evaluate. | All   10.2 |
| [JSON.Text](JSONText.md)   Queries JSON as text. | All   13.0 |
| [JSON.ToCSV](JSONToCSV.md)   Converts JSON to CSV. | All   15.2 |
| [JSON.ToHTML](JSONToHTML.md)   Converts JSON to HTML. | All   8.2 |
| [JSON.ToToon](JSONToToon.md)   Converts the JSON to TOON. | All   16.1 |
| [JSON.ToXML](JSONToXML.md)   Converts JSON to XML. | All   10.3 |
| [JSON.Unflatten](JSONUnflatten.md)   Unflattens that object back to the original json. | All   13.5 |
| [JSON.UpdateRecord](JSONUpdateRecord.md)   Update an existing record in a table in one line using JSON. | All   14.4 |
| [JSON.UpdateRecords](JSONUpdateRecords.md)   Updates existing records in a table in one line using JSON. | All   14.4 |
| [LDAP.AddJSON](LDAPAddJSON.md)   Adds an entry to a tree. | Mac/Win/Linux   8.0 |
| [LDAP.JSON](LDAPJSON.md)   Queries JSON structure of LDAP data. | Mac/Win/Linux   8.0 |
| [LDAP.ModifyJSON](LDAPModifyJSON.md)   Changes an existing entry. | Mac/Win/Linux   8.0 |

115 functions shown.

These functions require a license (62%).

### Release notes

- **Version 16.2**
    - Added [JSON.FromToon](https://www.mbsplugins.eu/JSONFromToon.shtml) function to convert TOON to JSON.
    - Changed [JSON.AddValueToObject](https://www.mbsplugins.eu/JSONAddValueToObject.shtml), [JSON.AddItemToObject](https://www.mbsplugins.eu/JSONAddItemToObject.shtml) and [JSON.AddNumberToObject](https://www.mbsplugins.eu/JSONAddNumberToObject.shtml) to replace existing items instead of adding a duplicate.
- **Version 16.1**
    - Added [JSON.ToToon](https://www.mbsplugins.eu/JSONToToon.shtml) function for passing data to LLMs.
    - Changed [JSON.Import](https://www.mbsplugins.eu/JSONImport.shtml) to take "-" for the root table name and then only use the prefix.
    - Changed [XML.Import](https://www.mbsplugins.eu/XMLImport.shtml) and [JSON.Import](https://www.mbsplugins.eu/JSONImport.shtml) to report an error if you pass invalid characters for the table name prefix or root name.
    - Fixed an issue with [JSON.InsertRecord](https://www.mbsplugins.eu/JSONInsertRecord.shtml) where we passed date as timestamp and FileMaker complained about incompatible types.
- **Version 16.0**
    - Added [JSON.SetFormatOptions](https://www.mbsplugins.eu/JSONSetFormatOptions.shtml) function.
    - Fixed a problem with [JSON.InsertRecord](https://www.mbsplugins.eu/JSONInsertRecord.shtml) not handling timestamps correctly.
- **Version 15.4**
    - Added flags for [JSON.FindValueInArray](https://www.mbsplugins.eu/JSONFindValueInArray.shtml) and [JSON.FindValueInObjectArray](https://www.mbsplugins.eu/JSONFindValueInObjectArray.shtml) functions.
    - Improved [JSON.ToCSV](https://www.mbsplugins.eu/JSONToCSV.shtml) to take an JSON array of arrays in addition to arrays of objects.
- **Version 15.3**
    - Enhanced [JSON.UpdateRecords](https://www.mbsplugins.eu/JSONUpdateRecords.shtml) to take keys as JSON array, so you can update multiple records with different primary keys.
    - Fixed [JSON.JSONPatch.FromDiff](https://www.mbsplugins.eu/JSONJSONPatchFromDiff.shtml) to do the copy key feature again, broken with jsoncons update in version 15.1.
    - Fixed [JSON.ToHTML](https://www.mbsplugins.eu/JSONToHTML.shtml) to not get confused with invalid JSON when handling embedded JSON.
- **Version 15.2**
    - Added [JSON.ToCSV](https://www.mbsplugins.eu/JSONToCSV.shtml) function.
- **Version 15.1**
    - Added flag 2048 for [JSON.Import](https://www.mbsplugins.eu/JSONImport.shtml) and [XML.Import](https://www.mbsplugins.eu/XMLImport.shtml) functions to check field types and convert number, time, date and timestamp if needed.
- **Version 15.0**
    - Added [JSON.SetVariables](https://www.mbsplugins.eu/JSONSetVariables.shtml) and [JSON.ClearVariables](https://www.mbsplugins.eu/JSONClearVariables.shtml).
    - Fixed an insufficient escaping for [JSON.SortWithEvaluate](https://www.mbsplugins.eu/JSONSortWithEvaluate.shtml) function, which sometimes caused an internal error and prevented sorting.
    - Improved [JSON.SetVariables](https://www.mbsplugins.eu/JSONSetVariables.shtml) and [XML.SetVariables](https://www.mbsplugins.eu/XMLSetVariables.shtml) functions to work better with multi line texts.
- **Version 14.5**
    - Added [JSON.InsertRecords](https://www.mbsplugins.eu/JSONInsertRecords.shtml) function to insert array of records in JSON.
    - Improved [JSON.InsertRecord](https://www.mbsplugins.eu/JSONInsertRecord.shtml) to be a bit faster and data type conversion to do numbers and texts, too.

### Blog Entries

- [AI Development with the MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2026-04-16/AI_Development_with_the_MBS_Fi/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 16.1 News](https://www.mbsplugins.de/archive/2026-03-31/MBS_FileMaker_Plugin_161_News/monkeybreadsoftware_blog_filemaker)
- [MBS @ FMTraining.TV - MBS Open Q&amp;A](https://www.mbsplugins.de/archive/2025-05-22/MBS_@_FMTrainingTV_-_MBS_Open_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Advent calendar - Door 15 - vCard QR](https://www.mbsplugins.de/archive/2024-12-15/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Advent calendar - Door 8 - Weather data with JSON](https://www.mbsplugins.de/archive/2024-12-08/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 14.4](https://www.mbsplugins.de/archive/2024-09-24/New_in_MBS_FileMaker_Plugin_14/monkeybreadsoftware_blog_filemaker)
- [Insert or update with JSON](https://www.mbsplugins.de/archive/2024-08-28/Insert_or_update_with_JSON/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 14.2 for Claris FileMaker](https://www.mbsplugins.de/archive/2024-05-14/MBS_Plugin_142_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS @ FMTraining.TV - New examples for FileMaker MBS Plugin](https://www.mbsplugins.de/archive/2024-03-06/MBS_@_FMTrainingTV_-_New_examp/monkeybreadsoftware_blog_filemaker)
- [Can FileMaker do that?](https://www.mbsplugins.de/archive/2024-02-03/Can_FileMaker_do_that/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 2/2025, Seite 23 bis 24](https://filemaker-magazin.de/neuigkeit/4286-Appetithappen-FMM_202502)
- [Ausgabe 6/2022, Seite 26](https://filemaker-magazin.de/neuigkeit/4206-Appetithappen-FMM_202206)
- [Ausgabe 5/2022, Seite 28](https://filemaker-magazin.de/neuigkeit/4196-Appetithappen-FMM_202205)
- [Ausgabe 3/2022, Seite 26 bis 27](https://filemaker-magazin.de/neuigkeit/4187-Appetithappen-FMM_202203)
- [Ausgabe 3/2022, Seite 24](https://filemaker-magazin.de/neuigkeit/4187-Appetithappen-FMM_202203)
- [Ausgabe 2/2022, Seite 33](https://filemaker-magazin.de/neuigkeit/4174-Appetithappen-FMM_202202)
- [Ausgabe 6/2021, Seite 23](https://filemaker-magazin.de/neuigkeit/4165-Appetithappen-FMM_202106)
- [Ausgabe 6/2020, Seite 26](https://filemaker-magazin.de/neuigkeit/4118-Appetithappen-FMM_202006)
- [Ausgabe 5/2020, Seite 15 bis 20](https://filemaker-magazin.de/neuigkeit/4110-Appetithappen-FMM_202005)
- [Ausgabe 5/2018, Seite 24 bis 25](https://filemaker-magazin.de/neuigkeit/4011-Appetithappen-FMM_201805)

### Example Databases

- [CURL/MQTT](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/MQTT.shtml#4ScriptAnchor_)
- [CURL/WebServices/CURL FMS Admin API v18](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/WebServices/CURL%20FMS%20Admin%20API%20v18.shtml#1ScriptAnchor_)
- [CURL/WebServices/ebay webservice/ebay Webservice](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/WebServices/ebay%20webservice/ebay%20Webservice.shtml#1ScriptAnchor_)
- [CURL/WebServices/Query IP and Country](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/WebServices/Query%20IP%20and%20Country.shtml#1ScriptAnchor_)
- [Files/Audio File Tags](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Files/Audio%20File%20Tags.shtml#1ScriptAnchor_)
- [JavaScript/CoordinatDistance](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/JavaScript/CoordinatDistance.shtml#1ScriptAnchor_)
- [Mac and iOS/Contacts/Contacts to FileMaker](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Contacts/Contacts%20to%20FileMaker.shtml#1ScriptAnchor_)
- [Mac and iOS/Contacts/Contacts](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Contacts/Contacts.shtml#3ScriptAnchor_)
- [Mac and iOS/Data Detector](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Data%20Detector.shtml#2ScriptAnchor_)
- [Network/Bonjour](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Network/Bonjour.shtml#1ScriptAnchor_)

[HTML Version](component_JSON.shtml)