Queries & JavaScript

A question, a query.
An answer you can use.

Use familiar MongoDB shell syntax for a quick lookup, or open Query Builder for a longer script. Your console output, results, and saved queries have a native home on your Mac.

Shell-style queriesJavaScript scriptsSaved queries
Take a closer look
Bison Query Builder running a customer analysis query over the fictional Trailhead database.
The real Query Builder in light appearance, with sample customer data.
01

Start with what you know.

Filter, project, sort, and limit with shell-style expressions. Schema-aware suggestions and searchable history help with the next query.

02

Room for the whole script.

Run JavaScript with a mongosh-style db API. Console output and the final query results have separate views, so each is easy to read.

03

Keep the useful ones.

Save queries for a collection or make them global. Return to a working answer instead of rebuilding it from scratch.

From first click to useful work

A place for
your next step.

  1. 01

    Choose the database context

    Select a connection, database, and collection for the work at hand.

  2. 02

    Write and run

    Execute a single statement or a script, then inspect its console output and results.

  3. 03

    Save your next starting point

    Give a reusable query a name and keep it with the collection or in your global library.

A few practical details

Good to know.
Before you begin.

Is this a full embedded mongosh runtime?

No. Bison runs JavaScript through JavaScriptCore with a mongosh-style database API. It does not promise Node.js modules or complete mongosh compatibility.

Can scripts write to my database?

Yes, on connections that allow writes. Every write in a script requires confirmation; a read-only connection refuses it.