I don't think all valid JS operators should be considered valid
JSONQuery operators as this would significantly increase the complexity
of JSONQuery implementations, at least if they are not using a
JavaScript engine. JSONQuery should be implementable in any language,
without requiring dependency on a full JavaScript capabilities. In
addition, in some situations where a JS engine is used, allowing all
operators may pose security risks as well (new, delete, and other
operators may have side-effects).
&& and || could be included, but with pure boolean operands there is no
difference in the resulting value (only a difference in execution of
operands, which I don't believe should be specified by a query
language). With non-boolean values, the logical operators' behavior
within JavaScript relies on the somewhat complicated boolean conversion
defined in JavaScript, and doesn't seem that valuable, IMO. It seems
like simplicity of grammar and syntax would be more valuable in this
case, but I am open to the idea that the logical operators are important
enough for inclusion.
Kris