Closed jrgns closed 9 years ago
@ph Is there a way to get this merged? What's the policy / workflow?
@ph @jordansissel Can we get this merged?
@suyograo Done.
@talevy I've refactored the feature. I believe this should address all of your comments.
@purbon I've coded a workaround to ensure the timestamp and version isn't discarded.
I used overwrite for the following reasons:
%{for}
)[foo][bar]
)If the core event can provide a method that handles those three cases, I can definitely use it.
I the intent to also support selecting specific values from arrays? if so, it would be awesome to see a test for select
ing specific array elements!
@talevy It certainly is. The test you suggested shows that more clearly. Added it and fixed the other issue as well.
Reading the subject of this PR alone "only keep the selected fields" - the prune filter can do this already, can't it?
indeed it can, thats the plugin I was looking for! for some reason I thought some of that functionality was in the base class, went looking for it, and couldn't find it. but prune definitely does it!
@jordansissel Indeed it can. The remove
feature can also be handled by that and the remove_field
option, so it might make sense to it from here?
Closing this.
Allow a user to only keep the specified fields.
This is a nice feature for when an input like IMAP is used where a number of (sometimes) useless fields are added, and you don't want to list all the fields to remove. Specifically since you're not sure what those extra fields will always be.
Tests included.