Hi everyone, I was wondering if anyone knew of a way to use a regular expression or a wildcard (or pehaps '%LIKE%'in SQL), so I could use JSONPath to search in a large JSON dataset.
For example (and yes, I understand, rather than eval( )entering my data in the application):
var obj = eval ( '({ "hey": "can you find me?" })' );
And I would like to be able to view the data as follows:
$.[?(@.hey:contains(find))]
where the content of the argument is part or all of the value in pairs { "key" : "value" }in my data.
At the moment I only found documentation >, <, =and !=relational operations that do not give me this flexibility.
Does anyone know how I can just simply JSONPath find this data (without having to scroll through all the records)?
I do not want to use Dojo JSONQuery, as this will require a different library. However, this allows you to do this, here is an example of them:
[?description~‘*the*’]
Ask me if you would like to clarify the question.
source
share