Fazendo Queries em JSON com Javascript

Queries são linguagens comuns em bancos de dados, seja SQL ou No-SQL.

Existem bibliotecas que permitem fazer queries:

JSONata
JSONPath

Referências

JSONata
https://docs.jsonata.org/overview.html

JSONPath.js
https://github.com/dchester/jsonpath
https://www.npmjs.com/package/jsonpath

JSONPath-Plus
https://github.com/JSONPath-Plus/JSONPath
https://www.npmjs.com/package/jsonpath-plus

JSONiq.js
https://github.com/wcandillon/jsoniq
https://www.jsoniq.org/

GraphQL.js
https://github.com/graphql/graphql-js

UnQL for Node.js
https://www.npmjs.com/package/unql

JSON-Query
https://github.com/auditassistant/json-query

XQuery 3.1

XPath 3.1

FontoxPath - XPath3.1 & XQuery 3.1 Engine
https://www.npmjs.com/package/fontoxpath

Qastack
https://qastack.com.br/programming/8481380/is-there-a-json-equivalent-of-xquery-xpath

You should also read: