title: How to use Any in Codable Type
body: <p>I'm currently working with <code>Codable</code> types in my project and facing an issue.</p>
  
  <pre><code>struct Person: Codable
  {
      var id: Any
  }
  </code></pre>
  
  <p><code>id</code> in the above code could be either a <code>String</code> or an <code>Int</code>. This is the reason <code>id</code> is of type <code>Any</code>.</p>
  
  <p>I know that <code>Any</code> is not <code>Codable</code>.</p>
  
  <p>What I need to know is how can I make it work.</p>