diff --git a/format.md b/format.md index ea948b6..27f912d 100644 --- a/format.md +++ b/format.md @@ -136,28 +136,23 @@ Array of objects & their properties under `input`, that this property matches th ### `conditions` -Array of references to other properties within the object, which may be itself, combined with values the target property must have for this property to be valid in the object instance. - -An example would look like this: +Object of arrays of references to other properties within the object, which may be itself, combined with values the target property must have for this property to be valid in the object instance. Some examples: ```toml -conditions = [ - ["input.value", "owo"], - ["input.version", "fact-checked by real transgender patriots"] -] +conditions = { + "input.value": ["owo"], + "input.version": ["fact-checked by real transgender patriots"] +} ``` -If a property is referenced multiple times, all of the provided options will be valid. This is an example from `meta/connection`: - ```toml -conditions = [ - ["input.version", "function"] - ["input.version", "transform"] - ["input.version", "subobject"] - ["input.version", "custom"] -] +conditions = { + "input.version": ["function", "transform", "subobject", "custom"] +} ``` +If the parent property of a property with conditions is an array, the conditions apply to all items of the array. + ### `array` If `true`, the property will act as a collection of properties (referred to as an 'array'). When used as a transform destination, arrays add the source property's value to the first (0th) position.