Automation and Artificial Intelligence
An inventory file must contain an "interfaces" array whose elements are objects with a "name" member. Which JSON document meets this requirement?
Show the answer
Correct answerB. {"interfaces":[{"name":"GigabitEthernet1"}]}
AWhy not this: The array contains a string rather than an object with a name member.
BWhy this is right: The interfaces value is an array containing an object with a name member.
CWhy not this: The interfaces value is an object, not an array.
DWhy not this: The array contains another array rather than an object with a name member.
An array of objects uses square brackets around elements enclosed in braces. An array of strings provides interface names but does not give each element a named member.