Dynamic list column label

Hi,

In the list configuration of October CMS, we can dynamically get the values of a jsonable field, like so:

    custom_fields[0][field_value]:
        label: Field 1
        valueFrom: custom_fields[0][field_value]
        type: text
        searchable: true
        sortable: true
    custom_fields[1][field_value]:
        label: Field 2
        valueFrom: custom_fields[1][field_value]
        type: text
        searchable: true
        sortable: true

Now I’d like to do the same, but with the label of the column… As below:

    custom_fields[0][field_value]:
        label: custom_fields[0][field_name]
        valueFrom: custom_fields[0][field_value]
        type: text
        searchable: true
        sortable: true
    custom_fields[1][field_value]:
        label: custom_fields[0][field_name]
        valueFrom: custom_fields[1][field_value]
        type: text
        searchable: true
        sortable: true

This obviously doesn’t work and just outputs custom_fields[0][field_name] literally as the column label…

I know that working via backend.list.extendColumns is an option, but in my case the list is a relation, and I’m unsure on how to dynamically add / change columns in such a setup.

It’s a long shot, but maybe someone knows an easy solution to this?

Here is the JSON of the custom_fields column, to give you an idea.

[{"field_name":"Your choice for session 1?","field_value":"Movie night!"},{"field_name":"Will you take part in the gala dinner?","field_value":1}]

Does anyone know of an easy solution?