Looking at the code snippet below, I am trying to extract the values of title and videoId. These elements are part of the session, which is nested within units. I am unsure how to retrieve their values using C# or the .Net framework.
Can anyone help me with extracting these values? If so, what would be the best approach to do so?
<script>
var MainData = {
config: {
debug: false
},
server: {
"deviceDownloadCardData": [],
"pageData": {
"legacyRendered": false,
"unitsData": {
"isTeacher": false,
"isAdmin": false,
"units": [
{
"id": 468400,
"sessions": [
{
"id": 2472822,
"title": "Introduction",
"videoId": "bc:123456789",
"playerID": 3890928181001,
}
]
}
],
},
"videoPlayerData": {
"totalSessionsDuration": "14m",
"units": [
{
"id": 468400,
"sessions": [
{
"id": 2472822,
"title": "Introduction",
"videoId": "bc:123456789",
"playerID": 3890928181001,
}
]
}
]
}
}
}
};