Querying from Javascript Use-API helper
I have a search component built in sightly that I want to use to query on a number of parameters associated to find news articles (which are simply cq:pages) in our content repository. I know how I would do this with the Java Use-API, but want to use the javascript api in this particular case (partly because I'm trying to learn how t he JS API works).
In a similar component built years ago, I used a jquery.ajax() call to /bin/querybuilder.json, however, I can't figure out how to include jquery successfully in my code (I can include the jquery dependency ok, but get an error when trying to call on the jQuery object). Additionally, I'm not sure if this is even the best thing to do--that perhaps some javascript implementation of the querybuilder is exposed through a generally available variable.
Any guidance is appreciated.