Help pruning fields with "%{[foo][bar]}" values

Yet another option is to split the csv into an array, then pop fields from it according to the conditionals. A demonstration of the idea can be found here.