I'm querying a column with a variable length JSON array.
select col.pages[1].name, col.pages[2].name from assoc
I get this error when there is only one value in the array.
INVALID_FUNCTION_ARGUMENT: Array subscript out of bounds
How do I prevent this error if there's only one value?