See references at the end for the jmespath specification. The JMESPath Operators table below summarizes some of the most common operators used in the jmespath query language. # Use the YAML callback plugin for output The json_query filter expects valid JSON as an input, so the Jinja2 expression below can also be passed directly into the json_query filter. A result variable was set to simplify the readability of the following examples. This string can be passed into the from_json filter to provide a valid JSON data structure. On Palo Alto devices the default stdout response is returned as a JSON encoded string. The jmespath third-party library must be installed on the host for the json_query filter to operate. It uses the third-party jmespath library, a powerful JSON query language supporting the parsing of complex structured data. The built-in json_query filter provides the functionality for filtering, shaping, and transforming JSON data. This can lead to complex task definition, making playbook maintenance more difficult. The extensive filters available, and what to use and when, can be overwhelming at first and the desired result can often require multiple filters chained together.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |