Wolfram: Association. Check Value Exist
Check Value Exist by Pattern
MemberQ[asso, pattern]
-
check value exist by Pattern. Return
True
if pattern matches a value.(* check value exist by pattern *) MemberQ[ Association[ a -> 3, b -> 2 ], 3 ] (* True *) MemberQ[ Association[ a -> 3, b -> 2 ], _Integer ] (* True *) MemberQ[ Association[ a -> 3, b -> 2 ], 9 ] (* False *)
(* check if there's a value that's list of pairs with second part a even number *) MemberQ[ Association[ a -> {9, 1}, b -> {3, 6} ], {_, _?EvenQ} ] (* True *)
Wolfram. Association (Key Value List)
- Wolfram: Association (Key Value List)
- Wolfram: Create Association
- Wolfram: Association. Add Item
- Wolfram: Association. Get Value
- Wolfram: Association. Check Key Exist
- Wolfram: Association. Check Value Exist
- Wolfram: Association. Delete Items by Key
- Wolfram: Association. Delete Items by Index
- Wolfram: Association. Delete Items by Filter
- Wolfram: Association. Sort
- Wolfram: Association. Union, Intersection, Complement, Etc
- Wolfram: Association. Map Function
- Wolfram: Association. Get All Keys or Values
- Wolfram: JSON Import Export