title: Need to pick indexes which does not contains any value in a List<List<String> matrix tic tac toe
body: <p>I have a nested list, like List&lt;List&gt; matrix ( this matrix contains values like [ {&quot;X&quot;,&quot;&quot;,&quot;O&quot;}, {&quot;&quot;,&quot;X&quot;,&quot;&quot;}, {&quot;&quot;,&quot;&quot;,&quot;O&quot;}])</p>
  <p>Need to Pick only those indexes from this nested list which is empty, like empty matrix =[(0,1), (1,0),(1,2),(2,0),(2,1)] in a list. After that I want to return only one value from the empty matrix , like new value = (1,0);</p>
  <p>my code is here</p>
  <pre><code>List&lt;String&gt; checkEmptyFields() {
      final playervalue = matrix;
      final n = countMatrix;
      var element;
      for (int i = 0; i &lt; n; i++) {
        for (int j = 0; j &lt; n; j++) {
          if (!(playervalue[i][j].contains(&quot;X&quot;) ||
              playervalue[i][j].contains(&quot;O&quot;))) {
            storeEmptyFields= jsonDecode(playervalue[i][j]);
          }
        }
          element = storeEmptyFields.values.toList();  // need to pick only one value and 
      return like (0,2)
  
          return element;
      }
      return element;
    }
  </code></pre>