["Sword of Honour","Moby Dick","The Lord of the "reference", Of course this query can be simplified to = 2 \|\| = 4)].title This query shows that arithmetical operations can be used in queries. Inside the strings, single or double quotes (depending on which are used to enclose it) and backslashes \ are escaped with the backslash \ character. Strings should be enclosed with single ' or double " quotes. Whitespace (space, tab characters) can be freely used in bracket notation segments and expressions, for example, $.first( ). However, when a function is used the JSONPath becomes definite, as functions always output single value.Ī definite path returns the object/array/value it's referencing, while indefinite path returns an array of the matched objects/arrays/values. An indefinite path can return multiple matches, basically JSONPaths with detached, multiple name/index list, array slice or expression segments. A definite path can return only null or a single match. JSONPaths can be divided in definite and indefinite paths. Incompatible input will cause the function to generate error. It means that the values are converted from string type to numeric if aggregation is required. Quoted numeric values are accepted by the JSONPath aggregate functions since Zabbix 4.2.8. Multiple functions can be chained if the preceding function returns value that is accepted by the following function.Ī JSON construct (object, array, value) depending on input array contents. Value referred to by the JSONPath from the current object/element only definite paths are operators: Operatorįunctions can be used at the end of JSONPath. Value referred to by the JSONPath from the input document root node only definite paths are supported. Numeric constant supporting scientific notation. Filter expressionįilter expression is a arithmetical expression in infix notation. To find a matching segment ignoring its ancestry (detached segment) it must be prefixed with '.', for example $.name or $. Match objects/array elements by applying filter expression. If negative specifies starting offset from the end of array. If not specified matches all array elements to the end. If not specified matches all array elements from the beginning. Match array elements by the defined range: Match all object properties or array elements. Match array element by any of the listed indexes. Match object property by any of the listed names. Return the number of objects with price being greater than 10. Return the number of history array elements of the first object with name > 10)].length() Return the price field of the first object with name = 'Object')].history.first().length() Return the number of object.history array = 'Object')].price.first() The separating dot before bracket segment is optional and can be omitted. A segment can be either a simple word like a JSON value name, * or a more complex construct enclosed within square brackets. JSONPath consists of segments separated with dots. The full JSONPath functionality as described in this page is available starting with Zabbix 4.2.5.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |