lloyd / JSONSelect

CSS-like selectors for JSON
http://jsonselect.org
ISC License
1.59k stars 116 forks source link

How to use || and && in the selector #56

Open field210 opened 10 years ago

field210 commented 10 years ago

I would like to use || and && in my expression. Here is an example.

On http://jsonselect.org/#tryit , I would like to select "name": {} when .first equals to "Lloyd" OR .last equals to "Hilaiel".

I tried this expression, but it does not work. :root :has(.first:val("Lloyd") || .last:val("Hilaiel"))

Could you please give me a suggestion? Thank you.