Im trying to extract an array of values from an array of objects in Postgresql, essentially map over the array and extract.
For instance I have a value of:
[{"id":123,"quantity":4,"amount":180},
{"id":563,"quantity":1,"amount":675},
{"id":563,"quantity":1,"amount":875},
...]
And I would like to extract just the amounts in an array, e.g:
[180,675,875...]
Is there a simple way of doing this in postgres?
Thank you for any help in advance