# Appending Asset into an array

**URL:** <https://forum.flow.com/t/appending-asset-into-an-array/432>\
**Category:** 🏄🏻‍♀️ Cadence\
**Created:** [July 17, 2020, 3:19pm UTC](https://forum.flow.com/t/appending-asset-into-an-array/432 "2020-07-17T15:19:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![makoto](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/makoto/32/5_2.png) [@makoto](https://forum.flow.com/u/makoto)\
**Post date:** [July 17, 2020, 3:27pm UTC](https://forum.flow.com/t/appending-asset-into-an-array/432/2 "2020-07-17T15:27:57Z")

</div>

The following seems almost working except that I get `loss of resource`.

```auto
    execute {
        let myCollections:@[NonFungibleToken.NFT] <- []
        log("NFT Minted and deposited to Account 2's Collection")
        let firstRound = self.minterRef.mintNFT(nfts: [], recipient: self.receiverRef)
        for element in firstRound {
            log(element)
            myCollections.append(<- self.collectionRef.withdraw(withdrawID: UInt64(element)))
        }
    }

```

---

_[View the full topic](https://forum.flow.com/t/appending-asset-into-an-array/432)._
