How do I give mobs custom names using command blocks? [duplicate]

I'm playing on iOS, and I need some help with commands. I'm trying to give mobs that I spawn custom names. I have tried the following:

/summon villager ~ ~ ~ {CustomName:"Dr.Tray"}

The error message I got was "Invalid Command Syntax"

If you know the correct way to do this, Please do not hesitate to tell me!


The only data tags that work in Pocket Edition are CanPlaceOn and CanDestroy for items. To rename a mob, you have to use an item tag.