I have an iOS application (written in Swift) that retrieves data from a wcf service in JSON format. One of the data is an image stored as a **base64string**. However, I was not able to convert the **base64string** to **NSData**.

My main purpose is to convert **base64string** all the way to **blob** so that I could save that in the database. On the other hand, if you know at least part of it such as from **base64string** to **NSData** would be helpful.

Following code would give you the idea of my table

```
let ItemsDB = Table("Items")
let idDB = Expression<String>("ID")
let nameDB = Expression<String>("Name")
let catDB = Expression<String>("Category")
let uomDB = Expression<String>("UOM")
let priceDB = Expression<Double>("Price")
let imageDB = Expression<Blob>("Image")
let actDB = Expression<Bool>("Active")

```