₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,151 members, 8,420,572 topics. Date: Friday, 05 June 2026 at 02:41 AM

Toggle theme

Help With This Json Data - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingHelp With This Json Data (785 Views)

1 Reply (Go Down)

Help With This Json Data by arejibadz(op): 7:05pm On Jan 06, 2022
please how can i access product.owner.name in javascript keep getting name is undefined in my console

"products": [
{
"_id": "61d6eb1a0d0cf950fac542cf",
"reviews": [],
"owner": {
"_id": "614f7e7e23c3db9a5202635b",
"name": "job robison",
"about": "about my self",
"__v": 0
},
]
Re: Help With This Json Data by EasternActivist: 7:10pm On Jan 06, 2022
Products[0].owner.name

Not sure though

The products variable is an array
Re: Help With This Json Data by arejibadz(op): 7:44pm On Jan 06, 2022
EasternActivist:
Products[0].owner.name

Not sure though

The products variable is an array
worked was able to get it how do i loop it there are more owners arrays
Re: Help With This Json Data by tensazangetsu20(m): 7:56pm On Jan 06, 2022
Use map. Products.map((item, index) => (<h1>{item.owner.name}</h1>))
Re: Help With This Json Data by arejibadz(op): 8:22pm On Jan 06, 2022
tensazangetsu20:
Use map. Products.map((item, index) => (<h1>{item.owner.name}</h1>wink)
thanks this worked
Re: Help With This Json Data by niel63(m): 10:00am On Jan 07, 2022
arejibadz:
thanks this worked
It will bro. And as a matter of fact. Hold on to it as you'll get to see and use it more often in your journey... you no fit escape am grin

Learn am... the three of them especially.

Map
Filter
Reduce
1 Reply

Python JSON | Encoding And Decoding JSON Data With PythonHow To Parse Json Data In GolangProgrammer Proficient In Connecting To A Web Service Through JSON In Wordpress234

Vacancy Exist At Aptech Ibadan Centre For The Position Of Faculties (2).#horriblebosses,flutterwave EditionHow Much Will It Take To Built A Well Sophisticated Online Exam System