-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.js
More file actions
41 lines (37 loc) · 821 Bytes
/
Copy pathexample.js
File metadata and controls
41 lines (37 loc) · 821 Bytes
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
var QueryJson = require('./');
var school = {
id: '201',
name: 'SM High School',
address: 'Mohadevpur, Naogaon',
students: [
{
id: '1',
name: 'Raju Ahmmed',
subject: 'IT'
},
{
id: '2',
name: 'Hanif Mondol',
subject: 'BSc'
},
{
id: '3',
name: 'Redu',
subject: 'Bangla'
},
{
id: '4',
name: 'Shipu Ahmmed',
subject: 'Medicale'
}
]
}
var query = new QueryJson(school);
var data = query
.start()
.select('students')
.where('subject', '=', 'IT')
.select(0)
.select('name')
.get();
console.log(data);