I need to mask some fields which are dynamic. This is what I'm using now:
var data = { a: 1, b: 2, c: 3, d: 4, e: 5 }
var mask = { a: " ", d: "0"}
---
data mapObject ((value, key, index) ->
(key): mask[key] default value
)
And I'm getting the expected output
{"a": " ","b": 2,"c": 3,"d": "0","e": 5}
Is it possible to use mask
or update
functions for this? Also, if you know you know which is the most performant solution, I would be really like to know hence I need to process 70MM records with it.