Need help in Parsing JSON Object

General
Highlighted
New Member

Need help in Parsing JSON Object

Hello

I need to write a Teradata query to parse the following nested JSON data and load the parsed data in a table for further querying.

 

{"John" : {"age":39, "origin":"USA", "SecurityNumber" : "###$$$%%", "DOB" : "01/01/1981",
"cars": {"car1":"Ford","car2":"BMW","car3":"Fiat"},
"previousemployment":{"ABC":"drama critic","Compy2":"film critic"} },
"Kevin" : {"age":50, "origin":"Canada", "SecurityNumber" : "***^^^", "DOB" : "01/01/1968","Currentlocation":"Texas",
"cars": {"car1":"Hyundai","car2":"Ferrari","car3":"Maserati"},
"previousemployment":{"Comp1":"analyst","Compy2":"reviewer"}}}

 

Once the data is parsed I need to query the following:

1. Total number of users registered

2. Number of cars each owner has

 

I would really appreciate if anyone could guide with this

 

Thank you