json_query: Update documentation (#73302)
This commit is contained in:
parent
e0c9f285ff
commit
7f6fcc3407
1 changed files with 2 additions and 2 deletions
|
@ -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.
|
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::
|
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
|
# 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 }}
|
{{ (("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.
|
.. 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
|
.. versionadded:: 2.4
|
||||||
|
|
Loading…
Add table
Reference in a new issue