# Destructure map keys, and also rest of the map?

**URL:** https://clojureverse.org/t/destructure-map-keys-and-also-rest-of-the-map/3988
**Category:** How to?
**Created:** [March 14, 2019, 4:11pm UTC](https://clojureverse.org/t/destructure-map-keys-and-also-rest-of-the-map/3988 "2019-03-14T16:11:41Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![didibus](https://clojureverse.org/user_avatar/clojureverse.org/didibus/32/951_2.png) [@didibus](https://clojureverse.org/u/didibus)
#### Post date: [March 17, 2019, 10:39pm UTC](https://clojureverse.org/t/destructure-map-keys-and-also-rest-of-the-map/3988/13 "2019-03-17T22:39:20Z")

</div>

Nice attempt, I think there’s some bugs lurking though. For example this didn’t work:

```auto
(let& [{c :c
        b :b
        :as m
        {aa :aa
         :as nm} :a}
       {:a {:aa :aa :bb :bb} :b :b :c :c}]
  (println [aa b c])
  [m nm])

```

So does this one:

```auto
(let& [{:keys [b c] :& m
        {:keys [aa] :& nm} :a}
       {:a {:aa :aa :bb :bb} :b :b :c :c}]
  (println [aa b c])
  [m nm])

```

---

_[View the full topic](https://clojureverse.org/t/destructure-map-keys-and-also-rest-of-the-map/3988)._
