Use a DMN table in a service task as a function?

Dear community,

I am design a process that does data import and sanitizing and I would like to have a DNM table where it will be possible to manage conversion rules in a user-friendly way, without any programming, like this (incomplete) table below:

Data like:

{
  "customers": [
    {
      "id": 18215684,
      "first-name": "John",
      "last-name": "Smith",
      "sex": "male",
...

Will then be expected to be transformed like that:

{
  "customers": [
    {
      "id": 18215684,
      "firstName": "John",
      "lastName": "Smith",
      "gender": "male",
...

The best way I see would be to use a service task that loop thru each keys of the JSON data and call the DNM table for each key as a function like:

formatted_key = DNM_table(imported_key)
# DNM_table("first-name") returns "firstName"

But I didn’t find how to. Is it possible to export a DNM table as a function that can be used by a service task?

I found this example: Pattern Review: DMN Looping for Array Input - #3 by StephenOTT, but it’s a bit complicated and it’s about looping an array into a DNM table, not a JSON variable.

After further research I found this library which does what I am looking for to use in my javascript external service: https://github.com/HBTGmbH/dmn-eval-js

For those looking something similar with the Java API, see: https://docs.camunda.org/manual/7.7/user-guide/dmn-engine/evaluate-decisions/