
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
A SQL-like query language for JSON objects.
npm install jsonsql
*
*.second_lvl.third_lvl
where
&&
||
()
=
!=
~
!~
var dataSource = {
'4866102f06de4f38bc30592e001cf423': {
beat: {},
holy: {addr: '88:63:df:a0:d7:03', name: 'CREEPY'},
user: '',
config: {},
id: '4866102f06de4f38bc30592e001cf423',
state: 2
},
'd07872f7d2e8447bbe874bbfd3fb0296': {
beat: {},
holy: {
addr: '5c:51:4f:50:3a:88',
name: 'CREEPY'
},
user: '',
config: {},
id: 'd07872f7d2e8447bbe874bbfd3fb0296',
state: 1
},
'f2de1084a1f142258d5849428f09e39f': {
beat: {},
holy: {
addr: '77:32:8a:c5:dd:63',
name: 'REDSHIT'
},
user: '',
config: {},
id: 'f2de1084a1f142258d5849428f09e39f',
state: 0,
date: '2012-05'
},
'cff9580b2efa4a2ba84784c1ac80eb09': {
beat: {},
holy: {
addr: '7f:e8:ee:32:cd:15',
name: 'CRAP'
},
user: '',
config: {},
id: 'cff9580b2efa4a2ba84784c1ac80eb09',
state: 1
}
};
var Query = require('jsonSQL');
var res = Query(dataSource, '* where holy.name=CRAP || (holy.name=CREEPY && (state=1 || state=2))');
console.log('======RESULT 1\n',res);
======RESULT 1
[ { beat: {},
holy: { addr: '88:63:df:a0:d7:03', name: 'CREEPY' },
user: '',
config: {},
id: '4866102f06de4f38bc30592e001cf423',
state: 2 },
{ beat: {},
holy: { addr: '5c:51:4f:50:3a:88', name: 'CREEPY' },
user: '',
config: {},
id: 'd07872f7d2e8447bbe874bbfd3fb0296',
state: 1 },
{ beat: {},
holy: { addr: '7f:e8:ee:32:cd:15', name: 'CRAP' },
user: '',
config: {},
id: 'cff9580b2efa4a2ba84784c1ac80eb09',
state: 1 } ]
var res = Query(dataSource, '*.id, *.holy.addr where holy.name=CRAP');
console.log('======RESULT 2\n',res);
======RESULT 2
[ { id: 'cff9580b2efa4a2ba84784c1ac80eb09',
'holy.addr': '7f:e8:ee:32:cd:15' } ]
var dataSource = {
'4866102f06de4f38bc30592e001cf423': {
name: 'Tom',
age: 33,
birth: new Date(2016, 1, 1)
},
'd07872f7d2e8447bbe874bbfd3fb0296': {
name: 'Jack',
age: 18,
birth: new Date(2015, 1, 1)
},
'd935869b80f542a9bf3f6a59d4f635f1': {
name: 'Peter',
age: 26,
birth: new Date(2014, 1, 1)
},
};
var Query = require('jsonSQL');
var res = Query(dataSource, '* where age<=30');
console.log('======RESULT 1\n',res);
======RESULT 1
[ { name: 'Jack',
age: 18,
birth: Sun Feb 01 2015 00:00:00 GMT+0800 (CST) },
{ name: 'Peter',
age: 26,
birth: Sat Feb 01 2014 00:00:00 GMT+0800 (CST) } ]
var Query = require('jsonSQL');
var res = Query(dataSource, '* where birth>' + new Date(2015,1,1).valueOf());
console.log('======RESULT 2\n',res);
======RESULT 2
[ { name: 'Tom',
age: 33,
birth: Mon Feb 01 2016 00:00:00 GMT+0800 (CST) } ]
var dataSource = [
{
"Version": "120",
"CreateDate": "2013-05-25T06:50:25.584Z",
"Desc": "abcdef"
},
{
"Version": "121",
"CreateDate": "2014-05-23T06:50:25.584Z",
"Desc": "dfdsf"
},
{
"Version": "122",
"CreateDate": "2015-05-26T06:50:25.584Z",
"Desc": "qewert"
},
{
"Version": "123",
"CreateDate": "2016-05-24T06:50:25.584Z",
"Desc": "xfsstd"
}
];
var Query = require('jsonSQL');
var res = Query(dataSource, '* where CreateDate>' + new Date(2014,1,1).valueOf());
console.log('======RESULT 1\n',res);
======RESULT 1
[ { Version: '121',
CreateDate: '2014-05-23T06:50:25.584Z',
Desc: 'dfdsf' },
{ Version: '122',
CreateDate: '2015-05-26T06:50:25.584Z',
Desc: 'qewert' },
{ Version: '123',
CreateDate: '2016-05-24T06:50:25.584Z',
Desc: 'xfsstd' } ]
FAQs
A SQL-like query language for JSON objects.
The npm package jsonsql receives a total of 88 weekly downloads. As such, jsonsql popularity was classified as not popular.
We found that jsonsql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.