I have a JSON field ('ez_links') in a table ('bookings') and I wish to return a particular attribute/element ('Amount'), which represents the price of the booking.
In the example below, I want to return the value of '662', but NULL is returned.
select ez_links, ez_links-> 'Amount' AS price
FROM bookings
limit 1
Result:
| ez_links | price |
|---|---|
| {"integrator": "ezlinks", "TeeTimeReserveRecord": {"Fee": "Troon App Member", "Amount": "662",...........................................}} | NULL |
Thanks for your help.