title: Is there a way to catch this unexpected value
body: <pre><code>[(9, '['), (25, ']'), (442, '['), (460, ']'), (558, '['), (576, ']'), (608, ']')]
  </code></pre>
  <p>In this list of tuples I am trying to find key of &quot;]&quot; in the end.
  If you take a closer look values goes like this;</p>
  <pre><code>[ =&gt; ] =&gt; [ =&gt; ] =&gt; [ =&gt; ] =&gt; [ =&gt; ]
  </code></pre>
  <p>But at last step it goes;</p>
  <pre><code>] =&gt; ]
  </code></pre>
  <p>I want to find key when this unexpected value appear.
  How can I do that?</p>