188k views
5 votes
A REST API query returns the following output:

{
"id": 12345,
"fname": "John",
"lname": "doe",
"group": {
"role": "Receivables",
"Read-only": [
"Accounting Folder",
"Sales Folder"
]
}
}

Which of the following statements is true?
a) The value of the group key is an array
b) The value of the id key is an array
c) The value of the fname key is equal to the lname key and its value.
d) The value of the role key is an object.
e) The value of the read-only key is a text value
f) The value of the lname key is a text value.

1 Answer

6 votes

Final answer:

The value of the group key is an array

Step-by-step explanation:

The correct statement is: a) The value of the group key is an array.

In the given output, the value of the group key is { "role": "Receivables", "Read-only": [ "Accounting Folder", "Sales Folder" ] } which is indeed an array. It contains two elements: the role of the group and the Read-only folders. The role key has a value of "Receivables" which is a string, and the Read-only key has a value that is an array of strings.

Therefore, statement a) is true.

User Amr Saber
by
8.3k points