How to compare "Any" value types : <p>I have several "Any" value types that I want to compare.</p>

<pre><code>var any1: Any = 1
var any2: Any = 1

var any3: Any = "test"
var any4: Any = "test"

print(any1 == any2)
print(any2 == any3)
print(any3 == any4)
</code></pre>

<p>Using the == operator shows an error:</p>

<blockquote>
  <p>"Binary operator '==' cannot be applied to two 'Any' (aka
  'protocol&lt;>') operands"</p>
</blockquote>

<p>What would be the way to do this ? </p>
