-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
escaping in values raises errors #160
Comments
Please provide a minimal reproducible test case--a small sample JSON file and the exact code you use to execute against it. No guarantees anyone can work on it, as this library is not being actively maintained, but should be more likely someone can look into it. You might also look at our test files to see how escaping is done there. |
Hi Brett, thank you for your quick reply :) Thank you very much, import { JSONPath } from 'jsonpath-plus';
const exampleObject = {
book: [
{
category: 'reference',
chapter: 'chap (1)',
author: 'Nigel Rees',
title: 'Sayings of the Century',
price: 8.95
}
]
};
describe('tests for jsonpath-plus', function () {
it('filter by attribute', function () {
const test = JSONPath({
path: "$.book[?(@.chapter === 'chap (1)')]",
json: exampleObject
});
});
}); This results in:
|
|
Hi Brett,
I started using your project, and I love it.
But I got one issue with filtering for values, that contain brackets. I tried escaping those brackets but it doesn't work.
Could you take a look at this?
I also tried to escape the value by using backticks. But it didn't work.
It is possible, that this is a bug?
It would be great if you could help me out.
Thank you very much,
Sebastian
The text was updated successfully, but these errors were encountered: