With
Use the with
operator to conveniently make multiple updates to a deeply nested path, or to update array elements relatively to each other. The first argument expression sets the root context, and the second expression runs against that root context.
Update and style
Given a sample.yml file of:
then
will output
Update multiple deeply nested properties
Given a sample.yml file of:
then
will output
Update array elements relatively
The second expression runs with each element of the array as it's contextual root. This allows you to make updates relative to the element.
Given a sample.yml file of:
then
will output
Last updated