I have neted JSON data like:
{"body":{"metrics":[{"a":1,"a1":1.1,"properties":{"propA":"name","propB":"age"}},{"b":2}]}}
{"body":{"metrics":[{"c":3}]}}
I can use select get_json_object(get_json_object(columnA,'$.Body'),'$.metrics') from... to extracted nested json arrays like:
[{"a":1,"a1":1.1,"a2":{"propA":"name","propB":"age"}},{"b":2}]
[{"c":3}]
I want to convert them into rows like:
{"a":1,"a1":1.1,"a2":{"propA":"name","propB":"age"}}
{"b":2}
{"c":3}
It seems the array returned by get_json_object is string and when I use later view it always says:
UDFArgumentException explode() takes an array or a map as a parameter
Length of each array is uncertain and I do not have permit to upload jar files to active new udf or serde clases. How to achieve this...
get_json_objectand it looks like string.. Or do you have any better idea? Btw, I just modified the original question post.