Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Update:</p> <p>According to <a href="http://jsonpath.googlecode.com/svn/trunk/tests/jsonpath-test-js.html" rel="nofollow noreferrer">the unit tests</a> and <a href="https://stackoverflow.com/a/2003741/278976">this answer</a>, you can embed a regex literal in the expression and it will be evaled. The following is the example from the unit test.</p> <pre><code>$.menu.items[?(@ &amp;&amp; @.label &amp;&amp; /SVG/.test(@.label))].id </code></pre> <p>So, for your example, it would be:</p> <pre><code>$.store.book[ ?( @ &amp;&amp; @.title &amp;&amp; /ord/.test(@.title) ) ].isbn </code></pre> <p>I've used jsonPath for some pretty large json files (2-3MB) and they were the cause of our application slow down. If you're concerned at all about performance, I'd suggest creating a supplementary index for each field the you'd like to search on. Doing this also allows you to weight the relevance value of each field, which is pretty important for getting good search results.</p> <p>Or better yet, if you anticipate that your application may grow, you may want to entertain a server-side search engine (<a href="http://sphinxsearch.com/" rel="nofollow noreferrer">http://sphinxsearch.com/</a> or the SAAS version <a href="http://indexden.com/" rel="nofollow noreferrer">http://indexden.com/</a>).</p> <p>As for you specific problem, the like operator is supposed to be supported. However, I've been able to achieve pretty good performance with just an array of strings (eg. the titles in your data structure) and using plain javascript regex (<a href="http://www.w3schools.com/jsref/jsref_obj_regexp.asp" rel="nofollow noreferrer">http://www.w3schools.com/jsref/jsref_obj_regexp.asp</a>).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload