Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

110
Views
Tiene problemas para intentar acceder a los datos anidados

Así que tengo una estructura de datos como la siguiente y estoy tratando de acceder dentro de los torneos al '_id' Cualquier ayuda sería genial. ¿Qué necesitaría para console.log para obtener 29?

 const sports = { "queryUrl": "config_tournaments/1/17", "doc": [{ "event": "config_tournaments", "_dob": 1647341355, "_maxage": 600, "_configid": 12457, "data": { "tournaments": [{ "_doc": "tournament", "_id": 29, "_sid": 1, "_rcid": 17, "_isk": 1, "_tid": 29, "_utid": 45, "name": "Bundesliga", "abbr": "BUN", "ground": null, "friendly": false, "seasonid": 84476, "currentseason": 84476, "year": "21/22", "seasontype": "21", "seasontypename": "Regular Season", "seasontypeunique": "68", "livetable": 57152, "cuprosterid": null, "roundbyround": true, "tournamentlevelorder": 1, "tournamentlevelname": "1st level", "outdated": false, "_sk": false }] } }] } console.log(sports.doc[0].data)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Prueba esto:

 console.log(sports.doc[0].data.tournaments[0]._id)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!