Extracting values from Postgres json blob
Lets get value 'a':
Howbout a nested value 'b'?
Howbout the first value of an array?
There's a better way to get a nested path
But you can't grab a value from an array with that method. But at least json_extract_path
returns a value of type json so you don't have to cast it before using the feather (->>) operator.