title: Swift operator `subscript` []
body: <p>I am beginner with the <code>Swift</code> having no advance knowledge with operators.</p>
  
  <p>I have the following class</p>
  
  <pre><code>class Container {
     var list: [Any] = [];
  }
  </code></pre>
  
  <p>I want to implement the operator <code>subscript []</code> in order to access the data from <code>list</code>.</p>
  
  <p>I need something like this: </p>
  
  <pre><code>var data: Container = Container()
  var value = data[5]
  // also    
  data[5] = 5
  </code></pre>
  
  <p>Also I want to be able to write something like this:</p>
  
  <pre><code>data[1][2]
  </code></pre>
  
  <p>Is it possible considering that element <code>1</code> from <code>Container</code> is an <code>array</code>?  </p>
  
  <p>Thanx for help.</p>