Index on JSON field with dynamic keys
Alter your JSON column to be jsonb and try a gin index on the data field like:

create index ginner on Visitor using gin(data);


They can be slow to create and big but will allow arbitrary queries. Here's a demonstration:

https://blog.codeship.com/unleash-the-power-of-storing-json-in-postgres/