ReactiveTable variable keys settings


#1

I have a reactivetable built from a collection with variable keys and want to apply functions to the fields but unsure how to identify a variable key in the settings.

the collection varies keys based on different user names, so one user might see:

User1 | User2 | User3
data | data | data
data | data | data

while another user might see:
User4 | User5 | User6
data | data | data
data | data | data

how can I assign a function to these varying keys?

One note - the function will be common across all fields/columns - is there a “Global” option for applying a function?

I attempted

fields:[
      {
        key: key,
        fn: function(val, obj, key){
          if(val === 'data'){
            return Spacebars.SafeString('<strong>Hello World</strong>')
          }
        }
      }
      ]

both with and without the ‘key’ field, but no luck. Is this just not supported?