So I have a data structure like below and I’m trying to access inside tournaments the ‘_id’ Any help would be great. What would I need to console.log to get 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)