title: How to check response codable value is empty or not?
body: <p>I am new to swift and codable too. I have below codable. I am getting all response of  API in "RecentResult". I want to check "data" is  empty or not. How do I check it?</p>
  
  <pre><code>struct RecentResult: Codable 
      {
          let input: Input
          let commandResult: CommandResultClass
      }
  
      struct CommandResultClass: Codable {
          let success: Int
          let message: String
          let data: DataClass
      }
  
      struct DataClass: Codable {
          let recentCount: String
  
          enum CodingKeys: String, CodingKey {
              case recentCount = "RecentCount"
           }
      }
  </code></pre>
  
  <p>To decode I am using this line but I am not getting how do I check for "data" is empty of not.</p>
  
  <pre><code>let strResponseData = try JSONDecoder().decode(RecentResult.self, from: data!)
  </code></pre>