We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a better way to achieve the following?
e..g assume I will get the following kinds of inputs
{:name "foo" :address {:postal 1111}} {:name "bar" :address {:postal nil}}
and I want to transform it into the following map
#1 {:Name "foo" :postal 1111} #2 {:Name "bar"}
i.e i don't want the key :postal to even be present if the value of it is going to be nil
:postal
(m/match {:name "faiz" :addr {:postal nil}} {:name ?name :addr {:postal ?post}} (merge {:Name ?name} (when ?post {:postal ?post})))
this was my initial attempt but the fact that i am writing some logic ( the how ) defeats the purpose of a declarative matcher such as meander
how
meander
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there a better way to achieve the following?
e..g assume I will get the following kinds of inputs
and I want to transform it into the following map
i.e i don't want the key
:postal
to even be present if the value of it is going to be nilthis was my initial attempt but the fact that i am writing some logic ( the
how
) defeats the purpose of a declarative matcher such asmeander
The text was updated successfully, but these errors were encountered: