The correct way is:
var persons = [Dictionary]()
which is equivalent to:
var persons = [[String : String]]()
What your code does instead is to create an array filled in with an instance of Dictionary
, whereas I presume you want an empty instance of the array containing elements of Dictionary
type.