I can't find out how to write a multidemensional array using 'Swift' and parse it. The sample code below is what I need it to do. The sample is written in JavaScript because I can't find the correct syntax in Swift but that is what I need to convert it to:
var array = [{
name:'Steve',
dates:[
'10-29-2016',
'11-03-2016',
]
},{
name:'Bill',
dates:[
'08-13-2016',
'01-20-2016',
]
}
]
console.log(array[0].name)
// logs 'Steve'
console.log(array[0].dates[])
// logs '11-03-2016'
When I tried to write it in Swift I get a lot of syntax errors and from my research I am unable to find examples using this array syntax. Any ideas? Thanks in advance!