json_query: Update documentation (#73302)

pull/73339/head
Abhijeet Kasurde 3 years ago committed by GitHub
parent e0c9f285ff
commit 7f6fcc3407
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -682,7 +682,7 @@ To select a single element or a data subset from a complex data structure in JSO
This filter has migrated to the `community.general <https://galaxy.ansible.com/community/general>`_ collection. Follow the installation instructions to install that collection.
.. note:: This filter is built upon **jmespath**, and you can use the same syntax. For examples, see `jmespath examples <http://jmespath.org/examples.html>`_.
.. note:: You must manually install the **jmespath** dependency on the Ansible controller before using this filter. This filter is built upon **jmespath**, and you can use the same syntax. For examples, see `jmespath examples <http://jmespath.org/examples.html>`_.
Consider this data structure::
@ -1660,7 +1660,7 @@ To get a date object from a string use the `to_datetime` filter::
# get amount of days between two dates. This returns only number of days and discards remaining hours, minutes, and seconds
{{ (("2016-08-14 20:00:12" | to_datetime) - ("2015-12-25" | to_datetime('%Y-%m-%d'))).days }}
.. note:: For a full list of format codes for working with python date format strings, see https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior.
.. versionadded:: 2.4

Loading…
Cancel
Save