nerdexam
Cisco

300-920 · Question #61

Drag and Drop Question Refer to the exhibit. A training coordinator must post links to Webex recordings on a company SharePoint site. This is usually a manual process, but a DevOps engineer wants to…

The correct answer is body; bodyContent; streamURL; message; recording. This question tests the ability to parse a JSON object, specifically extracting nested data using dot notation to access an array of objects and then iterating through it to retrieve a specific property.

Meetings

Question

Drag and Drop Question Refer to the exhibit. A training coordinator must post links to Webex recordings on a company SharePoint site. This is usually a manual process, but a DevOps engineer wants to automate it using Webex XML APIs. After a sucessful LstRecording call wrapped in xml2js, the console dir(result)' output is shown in the exhibit. Using dot notation', drag and drop the code below onto the code snippet to output the streamURL for each recording. Answer:

Exhibit

300-920 question #61 exhibit

Answer Area

Drag items

bodyrecordingbodyContentmessagestreamURL

Correct arrangement

  • body
  • bodyContent
  • streamURL
  • message
  • recording

Explanation

This question tests the ability to parse a JSON object, specifically extracting nested data using dot notation to access an array of objects and then iterating through it to retrieve a specific property.

Approach. The goal is to extract the streamURL for each recording listed in the JSON output.

  1. First Line: recordings = result {{ }}[{ }][{ }][{ }]. This line needs to define recordings as the array containing all individual recording objects. Following the JSON structure shown in the exhibit, the path to this array from the result object is result.messages.body.bodyContent.recording. Therefore, the drag options for the four blanks in the first line, in order, should be: message, body, bodyContent, recording. This makes the line recordings = result.message.body.bodyContent.recording.
  2. Second Line: for (i=0, i<recordings length, i++) Console.log(recordings[{{ }}]). Inside the loop, recordings[i] represents a single recording object. To output the streamURL of that specific recording, we need to access its streamURL property using dot notation. Therefore, the drag option for the blank in the second line should be streamURL. This makes the line Console.log(recordings[i].streamURL).

Common mistakes.

  • common_mistake. Common mistakes include:
  • Incorrect Path Order: Placing the drag targets in the wrong sequence for the JSON path (e.g., bodyContent before body). The JSON path must be followed strictly from the root to the target array.
  • Missing Keys: Skipping intermediate keys in the path, which would result in an undefined property.
  • Incorrect Final Accessor: Forgetting that recordings is an array of objects, and recordings[i] is an object. Some might incorrectly try to access recordings[i].recording or just recordings[i] (which would log the entire recording object, not just the streamURL).
  • Using streamURL prematurely: Attempting to use streamURL in the first line would lead to an error as streamURL is a property of individual recording objects, not an intermediate object in the path to the array itself.

Concept tested. JSON parsing, object traversal using dot notation, array iteration, and extracting specific data properties from nested data structures, often encountered when working with REST APIs and their JSON responses.

Topics

#Webex API#XML Parsing#JavaScript#Data Extraction

Community Discussion

No community discussion yet for this question.

Full 300-920 Practice