I am currently working on an Angular 4.x application where my goal is to showcase a random Wikipedia article. Each time I check the JSON data in Chrome Dev Tools under query/pages, I notice that the pageID always has a different number. The structure of the response is a JSON object rather than an array, with a dynamically named property which makes it challenging for me to create a TypeScript interface or bind to it. Any suggestions on how I can approach this issue?
Here's an example of the JSON response from the Wikipedia API:
{
"batchcomplete": "",
"continue": {
"grncontinue": "0.241230031087|0.241230543855|19422120|0",
"continue": "grncontinue||"
},
"warnings": {
"extracts": {
"*": "\"exlimit\" was too large for a whole article extracts request, lowered to 1."
}
},
"query": {
"pages": {
"742585": {
"pageid": 742585,
"ns": 0,
"title": "Speedway",
"extract": "<p><b>Speedway</b> may refer to:</p>\n<h2><span id=\"In_racing\">In racing</span></h2>\n<ul><li>Oval track racing, motor racing on an oval track which turns in one direction</li>\n<li>Cycle speedway, a form of bicycle racing</li>\n<li>Motorcycle speedway, a form of motorcycle sport</li>\n<li>Dirt track racing, known as speedway in Australia and New Zealand</li>\n</ul><h2><span id=\"Other_uses\">Other uses</span></h2>\n<dl><dt>Placenames</dt>\n</dl><ul><li>Speedway, California, former town in Butte County</li>..."
}
}
}
}