title: Codable - How can I declare optional Array type with empty array
body: <pre><code>struct Data: Codable {
    let name: String?
    let dataArray: [User] = [User]()
  }
  </code></pre>
  
  <p>dataArray is optional so I want to allocate it with empty but my Codable is failing? Can I know How can achieve this, I can declare it as Optional without allocating it. But I want to achieve this.</p>