# Destructure tuple refs in pull or query

**URL:** <https://forum.datomic.com/t/destructure-tuple-refs-in-pull-or-query/1567>\
**Category:** General\
**Created:** [August 4, 2020, 6:40pm UTC](https://forum.datomic.com/t/destructure-tuple-refs-in-pull-or-query/1567 "2020-08-04T18:40:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhinav](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@abhinav](https://forum.datomic.com/u/abhinav)\
**Post date:** [August 4, 2020, 6:40pm UTC](https://forum.datomic.com/t/destructure-tuple-refs-in-pull-or-query/1567/1 "2020-08-04T18:40:56Z")

</div>

Assume a ref attr :x/y  
we pull it as `(pull eid '[{:x/y [:y/a :y/b]}])`

now how do we do the same for a composite tuple  
where `:x/tup` has tupleTypes `[:db.type/ref :db.type/long]`  
i.e get the informtion of ref inside the tuple itself.

Result would be something like `[{:db/id "eid" :y/a "a" :y/b "b"} some-long]`
