I have a JSON Array field on table A, I want to read the relevant descriptions from another table B. Example: Table A,
| id | types |
|---|---|
| 1 | [C,B,T] |
Table B,
| type | description |
|---|---|
| C | Car |
| B | Bus |
| T | Train |
While reading data from table A, I want the result should be,
| id | types |
|---|---|
| 1 | [Car, Bus, Train] |
Can anyone help me with MySQL query to achieve this?
typesoutput will retain it's JSON array format right? What I'm curious is the end output and how it's going to be used. I mean, will it end up in a report?