A JSON array is an ordered collection of values enclosed in square brackets. In PostgreSQL, chained JSON operators navigate to an array, while a numeric position selects one element; positions start at 0. section 5.4.1
Inspecting a topping
SELECT pizza->'toppings'->'veggies'->0->>'onion' AS onions_amount FROM pizzeria.order_items WHERE order_id = 100; This returns light for the pizza containing the onion ingredient and empty values for other pizzas.


