I just had to recommend to a SO user that they write their native query like this:
select contactid, flag::::jsonb->>'priority' as priority from contact