Skip to content

Instantly share code, notes, and snippets.

@maxali
Created January 15, 2024 14:07
Show Gist options
  • Save maxali/f6e16d517d47b8b4251d521fbfb69edd to your computer and use it in GitHub Desktop.
Save maxali/f6e16d517d47b8b4251d521fbfb69edd to your computer and use it in GitHub Desktop.
myFilter
module.exports = function manipulateFilter(filter) {
if (filter && Array.isArray(filter.values)) {
filter.values.forEach(function(value) {
// Add a new property to each object in filter.values
value.newVar = "Some Value";
});
}
return filter;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment