Craur icon indicating copy to clipboard operation
Craur copied to clipboard

selector for entity by property

Open DracoBlue opened this issue 7 years ago • 0 comments

If we have the input:

<document>
  <body>
     <header name="hans">
        <mau you="me">mom</mau>
        <pau>la</pau>
    </header>
     <footer name="hans">
        emil
    </footer>
</document>

it would be great if one could do:

"document.body.header[mau=mom].pau"

to fetch "la"

or

"document.body.header[mau.@you=me].pau"

to fetch "la"

or

"document.body.header[mau=mom][]"

to fetch [{"mau" => "mom", "pau" => "la"}].

or

"document.body.footer[@name=hans]"

to fetch "emil".

DracoBlue avatar Jan 24 '18 10:01 DracoBlue