Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. asc=Association["a"->Association[1->1], "b"->Association["c"->Association[1->1]]]
  2.  
  3. (* <|a-><|1->1|>,b-><|c-><|1->1|>|>|> *)
  4.  
  5. DeleteCases[asc, _Association]
  6.  
  7. (* <||> *)
  8.  
  9. DeleteCases[asc, _Association, {2}]
  10.  
  11. (* <|a-><|1->1|>,b-><||>|> *)
  12.  
  13. DeleteCases[asc, _Association, {1,2}]
  14.  
  15. (* <|a-><||>|> *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement