I'm working on a PowerShell module that will work against a web api that can return information about users, groups, and other application objects. When querying the endpoints there are often several parameters you can send through in the body of the request to filter the results that are returned.
I'd like to create a -Filter parameter for my functions that can accept names of query parameters and filter on their values. I'm seeing this working similarly to the -Filter parameter in AD cmdlets where I can filter on multiple attributes. A challenge around that would be taking a string or scriptblock value and parsing out the results. I think this would involve tons of code and I probably wouldn't get it right anyway.
One thought that I had is to use hashtables for filtering. This would be similar to how Get-WinEvent works - each query...