-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
75 lines (71 loc) · 1.88 KB
/
README
File metadata and controls
75 lines (71 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Example use: (example object from csonv.js)
dat=[
{
"id": 1,
"name": "To Kill an Angry Bird",
"author": {
"id": 1,
"name": "Harper Lee",
"written_books": [
{
"$ref": "$[0]"
}
]
}
},
{
"id": 2,
"name": "The Rabbit",
"author": {
"id": 2,
"name": "JRR Tolkien",
"written_books": [
{
"$ref": "$[1]"
},
{
"id": 4,
"name": "The Lord of the Things",
"author": {
"$ref": "$[1][\"author\"]"
}
}
]
}
},
{
"id": 3,
"name": "Parslet",
"author": {
"id": 3,
"name": "William Shakespeare",
"written_books": [
{
"$ref": "$[2]"
}
]
}
},
{
"$ref": "$[1][\"author\"][\"written_books\"][1]"
},
{
"id": 5,
"name": "The Michelangelo Code",
"author": {
"id": 4,
"name": "Dan Brown",
"written_books": [
{
"$ref": "$[4]"
}
]
}
}
]
jsonQuery(dat).select("author.id").where("name").like("To").get()
Built to be used with csonv.js library (https://github.com/archan937/csonv.js)
How to extend:
jsonQuery.test.has=function(a,b){
return a[b];
}