JSONGetElement and JSONSetElement in FileMaker
IntermediateFileMaker's native JSON functions let you read and build JSON without plugins. Learn the syntax for reading values, building objects, and working with arrays.
What you'll learn
- How to read a value from a JSON object with JSONGetElement
- How to build a JSON object with JSONSetElement
- How to work with nested objects and arrays
FileMaker has had native JSON functions since version 16. JSONGetElement reads values, JSONSetElement writes them, and JSONListKeys lists the keys in an object. Together they handle the majority of JSON tasks in scripts and calculations.
1/5
1
Read a value with JSONGetElement
JSONGetElement ( json ; keyOrIndexOrPath ) extracts a single value from a JSON object or array. The second argument is the path to the value you want.
FileMaker Script
// Given: { "name": "Acme Corp", "id": 42 }
JSONGetElement ( Customers::jsonData ; "name" ) // → "Acme Corp"
JSONGetElement ( Customers::jsonData ; "id" ) // → 42Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo