1
| [{"name":"woods","app_id":"abc123"},{"name":"tiger","app_id":"def456"}]
|
1
2
3
4
5
6
7
| select a_json
from
(
select split(regexp_replace(regexp_extract (json_col ,'(\\[)(.*?)(\\])',2),'\\},\\{','\\}|\\{'),'\\|') as a_list
from dev.woods_test
) a
lateral view explode(a_list) a_list_tab as a_json
|
1
2
| {"name":"woods","app_id":"abc123"}
{"name":"tiger","app_id":"def456"}
|
1
2
3
4
5
6
7
8
9
| select
get_json_object(a_json,'$.name') as name,
get_json_object(a_json,'$.app_id') as app_id
from
(
select split(regexp_replace(regexp_extract (json_col ,'(\\[)(.*?)(\\])',2),'\\},\\{','\\}|\\{'),'\\|') as a_list
from dev.woods_test
) a
lateral view explode(a_list) a_list_tab as a_json
|
1
2
| woods,abc123
tiger,def456
|