Nested JSON with Recursive Function in Simple JavaScript
Code :
let data = [
{
"name" : "Azhar",
"job" : "Youtuber",
"location" : {
"city" : "Kolkata",
"state" : "WB"
}
},
{
"name" : "Arun",
"job" : "SE",
"city" : "Bangalore",
"state" : "Karnataka"
},
{
"name" : "Mr.Beast",
"job" : "YouTuber",
"location":{
"address" : {
"city" : "NewYork",
"state" : "US"
}
}
}
]
function recursive(obj){
for(prop in obj){
if(typeof(obj[prop])== "object"){
recursive(obj[prop])
} else {
if(prop == "name" || prop == "job" || prop == "city"){
console.log(prop+" : "+obj[prop])
}
}
}
}
data.filter(item= {
recursive(item)
})
Chapters:
0:00 - Introduction to the video.
0:23 - Forming a Nested Json
3:31 - Program for retrieving desired result in Nested JSON with Recursive Function
7:57 - End tags and subscription to the channel
My second Channel:
WrestleTalkByAzhar - / wrestletalkbyazhar
Follow Insta:
/ kingazharjamal
/ fari_digi
One Card App Link to Apply:
https://1cardapp.page.link/88LF
Cred App Link to Apply:
https://app.cred.club/spQx/ud86uunq
Next Steps :
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
Must Watch Playlists
► 1. Javascript - • Javascript Factory
► 2. Puppetter - • Puppeteer
► 3. Cypress - • Cypress
► 4. Tech works - • Video
► 5. Vbscript Basics To Advanced - • VBScript Part 1 - Features Advantages Dis...
► 6. Jmeter - • Jmeter Tutorials
► 7. Excel - • Videos On Excel
► 8. Appium - • Appium
► 9. Shares - • Shares
► 10. Javascript Interview Questions - • Javascript Interview Questions
► 11. C# Tutorials - • C# Factory
► 12. HTML & CSS - • HTML & CSS
► 13. Browser Console - • Browser Console
► 14. JSON - • Videos on Json
► 15. Specflow - • Specflow Tutorials
► 16. MongoDB - • MongoDB Tutorials
► 17. Postman - • Postman
► 18. Python - • Python
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
#json
#nested
#javascript
On this page of the site you can watch the video online Nested JSON with Recursive Function in Simple JavaScript with a duration of hours minute second in good quality, which was uploaded by the user Azhar Techno Coder 22 November 2022, share the link with friends and acquaintances, this video has already been watched 990 times on youtube and it was liked by 44 viewers. Enjoy your viewing!