I am conducting a simple search of JSON held in a MySQL database, however the results are returning enclosed in square brackets and quotes.
SELECT stored_json->>'$.*.referal' AS referal FROM table WHERE id = 100
results in
+------------+
| referal |
+------------+
| ["search"] |
+------------+
Is there a way to get MYSQL to return the results without the brackets and quotes?
+------------+
| referal |
+------------+
| search |
+------------+
Thanks
Edit
JSON example
{
"100": {
"referal": "search"
}
}