Deep Nested Json - Data to store in DB

Have a Json out put like

{
“query”: {
“results”: {
“industry”: [
{
“id”: “112”,
“name”: “Agricultural Chemicals”,
“company”: [
{
“name”: “Adarsh Plant”,
“symbol”: “ADARSHPL”
},
{
“name”: “Agrium Inc”,
“symbol”: “AGU.DE
}
},
]
{
“id”: “914”,
“name”: “Water Utilities”,
“company”: [
{
“name”: “Acque Potabili”,
“symbol”: “ACP.MI”
},
{
“name”: “Water Resources Group”,
“symbol”: “WRG.AX”
}
]
}
]
}
}
}

Need the out put like - Company Name, Company Symbol, Company id,
Company id name

and example of output would be

Adarsh Plant, ADARSHPL, 112, Agricultural Chemicals
Agrium Inc, AGU.DE, 112, Agricultural Chemicals
Acque Potabili, ACP.MI, 914, Water Utilities
Water Resources Group, WRG.AX, 914, Water Utilities

Any suggestions

That’s neither valid json nor a valid ruby hash. You can’t have things
like this:

x = [ 10, {“a”: ] “hello” }

Can an array be written like this:

[10, {“a”:]

Can a hash be written like this:

{“a”: ] “hello”}