cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Array Rename

Majid
New Contributor III

Hi Team,

I am trying to achieve below. I would need directions on how to achieve below in a mapper or any other way.

Source :
{
โ€œUBER_IDโ€:[
โ€œ1โ€,
โ€œInteger_patternโ€
],
โ€œFirst_nameโ€:[
โ€œMajidโ€,
โ€œTextOnly_patternโ€
],
โ€œLast_nameโ€:[
โ€œโ€,
โ€œTextOnly_patternโ€
]
}

Target :

I would like to rename the above fields based on the value in the array. Below is the output I am looking at.

{
โ€œInteger_patternโ€:[
โ€œ1โ€,
],
โ€œTextOnly_patternโ€:[
โ€œMajidโ€,
],
" TextOnly_pattern":[
โ€œโ€,
]
}

10 REPLIES 10

Majid
New Contributor III

@del Thank You so much for all your help. I think this is better solution and I will not need pivot and even data validator if I go with this solution. This will also make the pipeline more dynamic. Any new regex I need to add I will add in expression library.

I hope the performance is as good as I have seen in data validator. But this is the best solution for the use case I have.

Appreciate your help. Will update the post with final solution and performance metrics once I complete the code and testing.