JSON functions
Learn more about how Cortex XDR treats JSON functions in the Cortex Query Language.
The Cortex Query Language (XQL) includes a number of JSON functions. Before using any of these functions, it's important to understand how Cortex XDR treats a JSON so you can accurately formulate your queries using the correct syntax.
Important
JSON field names are case sensitive, so the key to field pairing must be identical in an XQL query for results to be found. For example, if a field value is "TIMESTAMP" and your query is defined to look for "timestamp", no results will be found.
<json_path>
Each JSON function includes defining a <json_path> in both the regular syntax or when using the syntatic sugar format. The <json_path> argument identifies the data of the JSON object you want to extract using dot-notation. When using the regular syntax, the beginning of the object is represented by a $. This $ is not required when using the syntatic sugar format.
Example:
If you have the following object:
{
"a_field" : "This is a_field value",
"b_field" : {
"c_field" : "This is c_field value"
}
}Then the path using the regular syntax:
$.a_fieldReturns "This is a_field value", while the path using the regular syntax:
$.b_field.c_fieldReturns "This is c_field value".
Field in <json_path> contains characters
Last updated
Was this helpful?
