Automation and Programmability

In the JSON pair "hostname":"R1", what is "hostname"?

Show the answer

Correct answerD. Key

AWhy not this: An object is a set of pairs inside curly braces, not a single name.

BWhy not this: An array is an ordered list of values in square brackets, not a name.

CWhy not this: The value is "R1", which follows the colon and holds the data.

DWhy this is right: The quoted string before the colon names the data, so it is the key.

The text before the colon in a JSON pair is the key, and the text after it is the value. Here "R1" is the value, not the key.