-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlearnJson.js
More file actions
executable file
·66 lines (47 loc) · 1.01 KB
/
learnJson.js
File metadata and controls
executable file
·66 lines (47 loc) · 1.01 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
// const student = [
// {
// id: 1,
// name: "abc",
// email: "abc@gmail.com"
// },
// {
// id: 2,
// name: "abc2",
// email: "abc2@gmail.com"
// },
// {
// id: 3,
// name: "abc3",
// email: "abc3@gmail.com"
// }
// ]
// console.log(student[2])
const student = {
std1: {
id: 1,
name: "abc",
email: "abc@gmail.com",
moreData:{
father_detail:{
name:"test",
job:"123",
},
hobies:["cricket","table tennis","exercise"]
}
},
std2: {
id: 2,
name: "abc2",
email: "abc2@gmail.com"
},
std3: {
id: 3,
name: "abc3",
email: "abc3@gmail.com"
}
}
console.log(student.std1.moreData.hobies[2])
// const server = JSON.stringify(data)
// console.log(server)
// const parse = JSON.parse(server)
// console.log(parse)