Open fpichlou opened 3 years ago
I think this is what you are looking for
import querystring from 'query-string';
// Removes a value from an array given its key
const removeFilter = (filterKey, array) => {
const filteredArray = array.filter(
(filter) => filter.key !== filterKey
);
const qs = querystring.stringify(filteredArray);
return qs;
}
I want to exclude a value of an array from query string. How I can do this?