I have this kind of data in platforminfo column
[{'df': {}, 'badKs': ['+81312277629'], 'objectId': 'JoF3NUHVYxDAoirH4e6i3g', 'platform': 'Web'}, {'df': {}, 'badKs': ['+81312277629'], 'objectId': '-vfa995e3b5d384b7dbfd8919bad17c28a', 'platform': 'iOS', 'os_version': '14.1', 'app_version': '3.16.2', 'make': 'Apple', 'model': 'iPhone12,3'}]
[{'df': {}, 'objectId': 'elQ8JEW2klEQFMZ0vXZDhw', 'platform': 'Web', 'phone': 5370002731}, {'df': {}, 'objectId': '__da533f19d1e040bea2b2b58fa6d2ecad', 'platform': 'Android', 'phone': 5370002731, 'os_version': '10', 'app_version': '3.6.4', 'make': 'Samsung', 'model': 'SM-A605G'}]
what I want is to parse this data into many column, but there is actually same definition but different naming badKs=phone
my expectation would be like this:
phone platform os_version make
+81312277629 iOS 14.1 Apple
5370002731 Android 10 Samsung
I already did with this query
split(REGEXP_REPLACE(platforminfo, r'([\{\}\]\'\"])', ''), 'phone:')[SAFE_OFFSET(ARRAY_LENGTH(SPLIT(platforminfo, ']')) - 1)] end
however this query is not good enough to parse the data, would be helpful if you can some how help me on this case. thx
