Skip to content
Advertisement

Query JSON array using MySQL

I’m trying to get the data within the Rule column. It has a value in JSON format. I’m trying to construct the query to get the part which says "value":8.

Column name: Rule.

JSON within column:

I’m stuck with this query:

My desired output is…

Advertisement

Answer

You may try using the JSON path $.element[0].total.value here:

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