I have a list of maps and I need to know if one other map contains in this list:
List of maps:
[{:a 1} {:a 2} {:a 3}]
My map:
{:a 2}
Expected output:
true
I had tried to use contains but do not work. I come up with a solution but I don't think its a good one:
(map
(fn [x]
(if (= x {:a 1})
true
false))
[{:a 1} {:a 2} {:a 3}])
The result of this code I'm getting a list of true or false, and I will need to see if contains one true in this list.
So my question is, exist some way easier to verify if exist a map in a list of maps?