diff --git a/content/en/blog/general/why-chainsaw-is-unique/index.md b/content/en/blog/general/why-chainsaw-is-unique/index.md index b38450952..a374c948b 100644 --- a/content/en/blog/general/why-chainsaw-is-unique/index.md +++ b/content/en/blog/general/why-chainsaw-is-unique/index.md @@ -120,14 +120,14 @@ spec: template: spec: (containers[?securityContext == null]): - (len(@)): 0 + (length(@)): 0 ``` In the assertion above, the first three fields `spec`, `template`, and `spec` are basic projections that simply take the content of their respective fields and pass that to descendants. -`(containers[?securityContext == null])` is a JMESPath expression filtering the `containers` array, selecting only the element where `securityContext` is `null`. This projection results in a new array that is passed to the descendant (`(len(@))` in this case). +`(containers[?securityContext == null])` is a JMESPath expression filtering the `containers` array, selecting only the element where `securityContext` is `null`. This projection results in a new array that is passed to the descendant (`(length(@))` in this case). -`(len(@))` is another JMESPath expression that computes the length of the array. There's no more descendant at this point. We're at a leaf of the YAML tree and the array length we just computed is then compared against 0. +`(length(@))` is another JMESPath expression that computes the length of the array. There's no more descendant at this point. We're at a leaf of the YAML tree and the array length we just computed is then compared against 0. If the comparison matches, the assertion will be considered valid; if not, it will be considered failed.