%dw 2.0
import * from dw::util::Tree
output application/dw  
---
{
  a: in0 nodeExists ((value, path) -> path[-1].selector == "password"),
  b: in0 nodeExists ((value, path) -> path[-1].selector == "foo"),
  c: in1 nodeExists ((value, path) -> path[-1].selector == "password"),
  d: in1 nodeExists ((value, path) -> path[-1].selector == "foo"),
  e: in2 nodeExists ((value, path) -> path[-1].selector == "password"),
  f: in2 nodeExists ((value, path) -> path[-1].selector == "foo"),
  g: null nodeExists ((value, path) -> value == "test")
}