I have an athena record with a json string as below.
{'is_referred': False, 'landing_page': '/account/register'}
I tried to extract the landing_page
value with query below but it returns null value.
select
json_string,
json_extract_scalar(json_string, '$.landing_page') as landing_page
from
my_table
I have also tried to replace the single quote to double quote but still can't retrieve the value.
select
json_string,
replace(json_string, '''', '"') as double_quoted_json_string
json_extract_scalar(double_quoted_json_string, '$.landing_page') as landing_page
from
my_table
Any advice, please?