Querying JSON fields in Redshift
Yes, Amazon Redshift supports parsing JSON string within a column with "JSON_EXTRACT_PATH_TEXT" function, and you can call this function even in where clause or group by clause. It's better to see the following example to understand how it works.
db=> create table json_test (id int primary key, json text);
db=> insert into json_test values (1, '{"key1":1, "key2":"a"}');
db=> insert into json_test values (2, '{"key1":2, "key2":"b"}');
db=> insert into json_test values (3, '{"key1":3, "key2":"a"}');
db=> insert into json_test values (4, '{"key3":0}');
db=> select * from json_test order by id;
id | json
----+------------------------
1 | {"key1":1, "key2":"a"}
2 | {"key1":2, "key2":"b"}
3 | {"key1":3, "key2":"a"}
4 | {"key3":0}
(4 rows)
-- In select list
db=> select json_extract_path_text(json, 'key2') as key2 from json_test where id = 1;
key2
------
a
(1 row)
-- Where clause
db=> select * from json_test where json_extract_path_text(json, 'key1') = 1;
id | json
----+------------------------
1 | {"key1":1, "key2":"a"}
(1 row)
-- Group by
db=> select min(id) as min_id from json_test group by json_extract_path_text(json, 'key2') order by min_id;
min_id
--------
1
2
4
(3 rows)
See Redshift Dev Guide - JSON_EXTRACT_PATH_TEXT Function for the details of "JSON_EXTRACT_PATH_TEXT" function. Also you can see other JSON functions in Redshift Dev Guide - JSON Functions.
Did you try using Redshift's JSON_EXTRACT_PATH_TEXT function?