Reputation: 901
I would like to remove fields from a message value if they match a regex, e.g. /^__before_.+$/
original:
{
"count": 5,
"bags": 42,
"__before_count": 4,
"__before_bags": 19
}
desired:
{
"count": 5,
"bags": 42,
}
As far as I can tell, the only way to filter fields is with a hard coded list, e.g., with the ReplaceField transformation.
Is it possible to define a regex to filter out fields?
Upvotes: 0
Views: 1119
Reputation: 191723
With built-in transforms, there is not, you need to write your own or find an external transform project that does it.
Upvotes: 1