Hi, 1)For below records or dataset, how can I replace "col4"

Hi,

1)For below records or dataset, how can I replace "col4" with a set of columns ("col41", "col42", "col43") dynamically in the records?
Input:
{
{col1: "dcgsdf", col2: "thstr", col3: 1, col4: "jtsjre", col5:56},
{col1: "asdg", col2: "jtrj", col3: 53, col4: "srtjgsf", col5:32},
{col1: "fdhd", col2: "dfhs", col3: 21, col4: "srtjf", col5:3},
{col1: "rae", col2: "DGAS", col3: 45, col4: "sjfgj", col5:0}
}

Output:

{
{col1: "dcgsdf", col2: "thstr", col3: 1, col41: "re", col42: "ad", col43: "sasd", col5:56},
{col1: "asdg", col2: "jtrj", col3: 53, col41: "sjgsf", col42: "erw", col43: "sadf", col5:32},
{col1: "fdhd", col2: "dfhs", col3: 21, col41: "tjf", col42: "asd", col43: "afsd", col5:3},
{col1: "rae", col2: "DGAS",col3: 45, col41: "fgj", col42: "sf", col43: "wewf", col5:0}
}

OriginalPostID-207581

OriginalPostID-207581

  Discussion posts and replies are publicly visible

Parents
  • Not sure this question makes much sense. In that example (the one I gave you), the col2, col4, names are representing the field names in a dictionary item. However, normally it would be a CDT, and "replacing" the fields names of a CDT dynamically isn't something you'd normally do. What exactly are you trying to accomplish?
Reply
  • Not sure this question makes much sense. In that example (the one I gave you), the col2, col4, names are representing the field names in a dictionary item. However, normally it would be a CDT, and "replacing" the fields names of a CDT dynamically isn't something you'd normally do. What exactly are you trying to accomplish?
Children
No Data