Skip to content
Advertisement

How to get the value of specific index inside an array column using mysql?

This is my database table

JavaScript

I am passing index id to the function. Is there a way to do it like this?

Advertisement

Answer

Use the arrow operator (MySQL-only):

JavaScript

Or its alias JSON_EXTRACT() (MySQL & MariaDB):

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