PostgreSQL - duplicate data show and count
I think you just want a simple group by query, using the 3 expressions that get data out of the json column:

select 
    config-&gt;&gt;'external_http_port' as external_http_port, 
    config-&gt;&gt;'external_host'      as external_host, 
    config-&gt;'snapshots'-&gt;&gt;'jpg'   as jpg,
    count(*)                      as count
from
    cameras
group by 
    config-&gt;&gt;'external_http_port',
    config-&gt;&gt;'external_host', 
    config-&gt;'snapshots'-&gt;&gt;'jpg' 
-- having                              -- to show only those 
--     count(*) &gt; 1                    -- with count &gt; 1
  ;


Tested in SQLfiddle.