Skip to content

Commit 6c04e88

Browse files
committed
nestedobjects
1 parent dafb1a0 commit 6c04e88

2 files changed

Lines changed: 88 additions & 0 deletions

File tree

Objects/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Document</title>
7+
</head>
8+
<body>
9+
10+
11+
<script src="obj.js"></script>
12+
</body>
13+
</html>

Objects/obj.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
const twoObject = [
2+
{
3+
color: [
4+
{
5+
red:[
6+
{name :"red"}
7+
]
8+
} ,
9+
10+
{
11+
blue:[
12+
{name:"slotz"} ,
13+
{
14+
sky:[
15+
{name:"stone"}
16+
]
17+
}
18+
]
19+
} ,
20+
{
21+
yellow:[
22+
{
23+
gold:[
24+
{name:"Corn"}
25+
]
26+
},
27+
{
28+
wtlor:[
29+
{name:"blonde"},
30+
{name:"fire"}
31+
]
32+
}
33+
]
34+
} ,
35+
{
36+
black:[
37+
{
38+
name:"white"
39+
}
40+
]
41+
}
42+
43+
]
44+
},
45+
{
46+
cars: [
47+
{
48+
truck: [
49+
{ name: "Ashoke" },
50+
{ name: "Tata" }
51+
]
52+
},
53+
{
54+
passenger: [
55+
{ name: "BMW" },
56+
{ name: "Suzuki" },
57+
{ name: "Honda" },
58+
{
59+
tata: [
60+
{ name: "Safari" },
61+
{ name: "Nano" }
62+
]
63+
}
64+
]
65+
},
66+
{
67+
auto: {
68+
name: "Auto"
69+
}
70+
}
71+
]
72+
}
73+
];
74+
75+
console.log(twoObject)

0 commit comments

Comments
 (0)