
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Library for Searching in a JSON forked from dojox/json for the users don't want to use dojo in their project but still love and trust the libraries and modules created by Dojo Team
JSON Query - Dojox/Json/Query converted into normal JavaScript File
Can be used with in Browser and with node.js
$ npm install json_query
Since the code is same as Dojox/Json/Query. Its usability is also same.
Example:
var jsonQuery = require('../query')();
var data = [{"name":"harpreet","age":25,"subjects":[{"name":"English","class":"8"},{"name":"Hindi","class":"8"},{"name":"Math","class":"8"},{"name":"Science","class":"8"}]},{"name":"kuljeet","age":26,"subjects":[{"name":"English","class":"12"},{"name":"Punjabi","class":"12"},{"name":"Math","class":"12"},{"name":"Science","class":"12"}]}]
jsonQuery.query("$..[?class]", data)
JSON Query contains some enhancments not found in the original implementation. These include:
Path in results (Currently not supported when running in browser): It is often useful to also recieve the paths to the found items. By setting "pathPropName" when creating the JSON Query object, a property name containing the path will be created in each sub-object of the data.
NOTE: This operation adds properties to the data
Example:
var jsonQuery = require('query');
var _res = jsonQuery({pathPropName: "__path__"}).query("$..[?year>1975]", data)
console.log(_res[1].__path__)
// output
// ['bands']['Dire Straits']['albums']['1']
Since the code is same as Dojox/Json/Query. Its Quality is also same. Because it is in Dojox not in Dojo, it may have some issues.
The jsonQuery is dual licensed under BSD 3-Clause and AFL same as Dojo Toolkit. For more information on the license please see the License Information. The Dojo Toolkit is Copyright (c) 2005-2018, The JS Foundation. All rights reserved.
FAQs
Library for Searching in a JSON forked from dojox/json for the users don't want to use dojo in their project but still love and trust the libraries and modules created by Dojo Team
The npm package json_query receives a total of 10 weekly downloads. As such, json_query popularity was classified as not popular.
We found that json_query demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.