json-lenses
json-lenses copied to clipboard
Jsonpath: support && and ||
I am faced with the fact that some operations are not currently supported in JsonPath. I have query like this:
$.[?(@.id=='1' && @.name == 'Pasha')]
I see that this project has not been updated for a long time... Do you have any plans to support this project?
I'm not planning any new development myself right now but I'm fine with releasing new versions if there are contributions to be released.
This feature should be relatively easy to add, so I'd be happy to look at a PR and release a new version when needed.
You would need to introduce new classes
case class And(p1: Predicate, p2: Predicate) extends Predicate
// same for or
in JsonPath.scala, then add a parser for that in JsonPathParser.scala, and an implementation/conversion in JsonPathIntegration.scala.