We log our payloads so we want to mask the keys of PII and PCI related information, like SSN/PIN and so forth...
I came up with JSON.stringify solution, but wasn't able to find something like _.mask(object/array,['pin','ssn'], *)..
May be there might be a solution available combining multiple methods ?
Thanks,
Sameer
Hi @SameerSiddiqui!
We have _.mapKeys or _.mapValues.
Don't forget to check out our gitter chat for help too.
Yeah, but i just noticed. it will not handle Arrays
_.mapKeys(object, [iteratee=_.identity])
anyPlans to make to compatible ? _.map does takes array why _.mapKeys does not ?
Thanks,
Sameer
No plans.
_.mapKeys and _.mapValues are specialized for objects. _.map is a collection method which will iterate over array-likes and objects.