Can a group_concat work with json_encode filed

I have been searching if is is possible to concatenate a table based on a list of ids from another table.field which is json encoded

I have a field that looks like this

  "0": {
    "person": "5",
    "role": "1"
  "1": {
    "person": "6",
    "role": "36"

basically the person is a foreign key to the people table and the role is a foreign key to the roles table, can I concatenate persons with ids 5, 6 or do I need to run a different query?

Which database are you working with? PostgreSQL can work natively with JSON values, and if you use MySQL there are UDFs available too which might be useful.

I am using mysql, so about UDFs, can you give me a sample, I am going to start reading into it.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.