Forum Discussion
Remapping all field names can be done using the Object.mapKeys() method. For example:
Hope this helps!
darshthakkar
4 years agoValued Contributor
Thank you @koryknick for the solution. It worked!
I was also able to play around with that and found a way to suffix as well as use a combination of both suffix and prefix.
Prefix:
$.mapKeys((elem,key) => "sfdc_"+key)
Suffix:
$.mapKeys((elem,key) => key + "_DT")
Combination of prefix and suffix:
$.mapKeys((elem1,key,elem) => "SL_" + key + "_DT")
Thanks again for your help 🙂
- darshthakkar4 years agoValued Contributor
The format of .mapKeys is very vital as I tried the below formats and it completely changed what I wanted to achieve:
$.mapKeys((key,elem) => key+"_sfdc")
$.mapKeys((key,elem) => "sfdc_"+key)
Related Content
- 11 months ago