# JSON<no value>
// <!-- Required for asciidoctor -->
:toc:
// Set toclevels to be at least your hugo [markup.tableOfContents.endLevel] config key
:toclevels: 4

[cols="1^,1^,1^",options=header]
|===
| source | condition | target
| &#10004; | &#10004; | &#10004;
|===

== Description

**source**

The JSON "source" retrieves an information from a JSON file.

**condition**

The JSON "condition" tests that an information exist in a JSON file.

**target**

The JSON "target" ensures that a JSON file content a specific value at specific location.

== Parameters

{{< resourceparameters "sources" "json" >}}

=== Query

The JSON plugin relies on link:https://daseldocs.tomwright.me/[Dasel] to query json files

== Examples

=== Retrieves a value from a JSON file

[source,yaml]
----
# updatecli.yaml
{{<include "assets/code_example/docs/plugins/resources/json/updatecli.d/default.yaml">}}
----

=== Uses a path to find a value in a JSON file

[source,yaml]
----
# jenkins-old-versions.yaml
{{<include "assets/code_example/docs/plugins/resources/json/updatecli.d/jenkins-old-versions.yaml">}}
----
