The two documents in the VideoGames1 collection have the highestScores key with an array of JSON documents that provide a player object, also known as sub-document when we work with Cosmos DB. The array of JSON documents also provide a score value. In the two video games, the player sub-documents have different properties and only the nickName and clan properties are included in the player sub-document for the high score definitions of both video games. The video game whose id is equal to "1" defines a player with the following properties: nickName and clan. The video game whose id is equal to 2Â defines a player with the following properties: nickName, clan, and experienceLevel.
Now, we want to retrieve the video game name, the player's nickname, and the high score achieved by the player on the game. The following table summarizes the properties...