// your_column = [{id: 1, name: "Tom", age: 30}];
SELECT * FROM your_table
WHERE json_contains(your_column->'$[*].id', json_array("your_id_to_match"));
![Cover image for Extract Array of object data in MySql DB](https://media.dev.to/cdn-cgi/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fowu8nsw7wfy23dl5fcnb.png)
For further actions, you may consider blocking this person and/or reporting abuse
// your_column = [{id: 1, name: "Tom", age: 30}];
SELECT * FROM your_table
WHERE json_contains(your_column->'$[*].id', json_array("your_id_to_match"));
For further actions, you may consider blocking this person and/or reporting abuse
SalladShooter -
dev.to staff -
Sloan the DEV Moderator -
dev.to staff -
Top comments (0)