Skip to content
Advertisement

Reading JSON array containing JSON object into rows

Based from this answer I found one problem. JSON object is return as NULL.

Suppose that I have a JSON like this:

With a query like this:

This’s the result:

I want to know is there a way to get a result like this? (Return JSON as escaped string instead of NULL)

Advertisement

Answer

You need to use AS JSON option in your schema definition to specify that the $.some_object property contains an inner JSON object:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement