For accessing a specific element by position in a JSON array stored in a VARIANT column named tags, which notation is correct in Snowflake, to get the first element?
- A. tags{0}
- B. tags[0]✓ Correct
- C. tags(0)
- D. tags.FIRST
Explanation
Snowflake uses zero-indexed bracket notation to access array elements by position, so tags[0] retrieves the first element of the array (as a VARIANT). Options A, C, and D use syntax forms that are not valid Snowflake VARIANT array indexing.