Query last element in array from json structure in postgres
Something like this should get the last element of your example:
SELECT t.col->'items'->(json_array_length(t.col->'items')-1)
FROM tbl t
SQLFiddle showing this in action...
In Postgres 9.5+ one can now use negative subscripts to achieve this.
For your case above, getting the last element could be achieved by:
SELECT t.column->'items'->-1 AS elem
FROM tbl t
WHERE other_column = 20;