Get basic values in FQL
FQL uses location path syntax to extract values from JSON structures. The following examples show several examples of getting basic values from JSON data.
Example JSON
The examples below use this JSON data in a variable named data:
Get a top-level field
To access a top-level field with FQL, enter the field’s name.
Get a nested field
To access fields below the top level, use field names separated by dot . delimiters.
Get an entire object
Enter the name of an object in the JSON file to retrieve all the data within that object.
Select a specific index in an array
To access individual values in an array in a JSON file, specify an index number between square brackets after the array’s name.
Select an entire array
Enter the name of an array in the JSON file to retrieve all the data within that array.
Return one field of every object in an array
To return a specific field from multiple objects in an array, enter the array’s name then the field’s name, separated by a dot.
Return fields that contain special characters in the key name
If a field in the JSON file has special characters (like spaces), put the field’s name in single quotes.