title: Match the data type of a object in Swift
body: <p>How to match the data type of a object in Swift?</p>
  
  <p>Like:</p>
  
  <pre><code>var xyz : Any
      xyz = 1;
      switch xyz
   {
      case let x where xyz as?AnyObject[]:
          println("\(x) is AnyObject Type")
      case let x where xyz as?String[]:
          println("\(x) is String Type")
      case let x where xyz as?Int[]:
          println("\(x) is Int Type")
      case let x where xyz as?Double[]:
          println("\(x) is Double Type")
      case let x where xyz as?Float[]:
          println("\(x) is Float Type")
      default:println("None")
      }
  </code></pre>
  
  <p>In this case switch case run default case</p>