I have a problem to make a postgres query with join from data of json.
I have 2 tables
The first one is media:
- id as integer
- path as string
and an other table playlist
- id as integer
- media as string (with my json inside)
For example
Media:
1 /img/a.jpg
2 /img/b.jpg
3 /img/c.jpg
4 /img/d.jpg
5 /img/e.jpg
Playlist:
1 ["1", "2", "5"]
2 ["4", "2", "3", "1"]
I want to make an SELECT on playlist and get back all path ideally as json or if not possible something like (example for playlist 1):
1 /img/a.jpg
2 /img/b.jpg
3 /img/e.jpg
...