title: Check If the Array contains value in Azure Data Factory
body: <p>I need to process files in the container using Azure Datafactory and keep a track of processed files in the next execution.</p>
  <p>so I am keeping a table in DB which stores the processed file information,
  In ADF I am getting the FileNames of the processed files and I want to check whether the current file has been processed or not.</p>
  <p>I am Using Lookup activity: <strong>Get All Files Processed</strong>
  to get the processed files from DB by using below query:</p>
  <pre><code>select FileName from meta.Processed_Files;
  </code></pre>
  <p>Then I am traversing over the directory, and getting File Details for current File in the directory by using Get Metadata Activity: <strong>&quot;Get Detail of Current File in Iteration&quot;</strong></p>
  <p>and in the If Condition activity, I am using following Expression:</p>
  <pre><code>@not(contains(activity('Get All Files Processed').output.value,activity('Get Detail of current file in iteration').output.itemName))
  </code></pre>
  <p>This is always returning True even if the file has been processed</p>
  <p>How do we compare the FileName from the returned value</p>
  <p>Output of activity('Get All Files Processed').output.value</p>
  <pre><code>{
  &quot;count&quot;: 37,
  &quot;value&quot;: [
      {
          &quot;FileName&quot;: &quot;20210804074153AlteryxRunStats.xlsx&quot;
      },
      {
          &quot;FileName&quot;: &quot;20210805074129AlteryxRunStats.xlsx&quot;
      },
      {
          &quot;FileName&quot;: &quot;20210806074152AlteryxRunStats.xlsx&quot;
      },
      {
          &quot;FileName&quot;: &quot;20210809074143AlteryxRunStats.xlsx&quot;
      },
      {
          &quot;FileName&quot;: &quot;20210809074316AlteryxRunStats.xlsx&quot;
      },
      {
          &quot;FileName&quot;: &quot;20210810074135AlteryxRunStats.xlsx&quot;
      },
      {
          &quot;FileName&quot;: &quot;20210811074306AlteryxRunStats.xlsx&quot;
      },
  </code></pre>
  <p>Output of activity('Get Detail of current file in iteration').output.itemName</p>
  <pre><code>&quot;20210804074153AlteryxRunStats.xlsx&quot;
  </code></pre>