JsonPath
JsonPath copied to clipboard
Filters error on CLI
Hello
There's problems on the use of filters with PHP CLI (@see unit test testGetAllByKeyFiltered), the eval function seems to fail. If someone got an idea..
Regards, Peekmo
I'll see if I can clear this. I need CLI to work ;)
Il could be nice, that's really annoying, also for unit tests.. I spend many many hours on it.. never found the problem.
Looks like it's in how tempFilters() parses the dot notation. I don't have it fixed yet, but I have made a little progess on it.
What I've done so far, I'll dig into it a bit more this weekend probably, but if you have any ideas or direction please let me know https://github.com/polerin/JsonPath/compare/FilterFix?diff=split&name=FilterFix
The problem is the syntax on line 233. the right one should be:
$res = eval('$name = $expr;');
But then your test has a endless loop.