List of value to list of obj

how to convert list of values to list of dictionaries.

source:

{
  "key": "clo_nomen",
  "values": [
    "7616999099",
    "34567",
    "9876543"
  ]
}

and needed result should be

{
  "key": "clo_nomen",
  "values": [
    "7616999099",
    "34567",
    "9876543"
  ],
  "dic_values": [
    {
      "value":"7616999099"
    },
    {
      "value":"34567"
    },
    {
      "value":"9876543"
    }
  ]
}

I got it.

Data transformer → Copy using a pattern.

  1. Pattern: values.*
  2. Replacement: dic_values.$1.value
1 Like

Hi @vosy

Glad to hear that! Yes, the “Copy using a pattern” works the best for this case.

1 Like