title: How to check if array contains string with Azure DevOps pipeline expressions
body: <p>I have the following pipeline template that I want to use to conditionally execute stages based on the input parameter <code>stages</code>.</p>
  <pre class="lang-yaml prettyprint-override"><code>parameters:
  - name: dryRun
    default: false
    type: boolean
  - name: path
    type: string
    default: terraform
  - name: stages
    type: object
    default:
    - test
    - prod
  
  stages:
    - stage:
      pool: 
        vmImage: 'ubuntu-latest'
      displayName: &quot;Deploy to test&quot;
      condition: in('test', ${{ parameters.stages }})
      jobs:
      - template: terraform-job.yaml
        parameters:
          stage: test
          path: ${{ parameters.path }}
          dryRun: ${{ parameters.dryRun }}
    - stage:
      pool: 
        vmImage: 'ubuntu-latest'
      displayName: &quot;Deploy to production&quot;
      condition: in('prod', '${{ join(', ', parameters.stages) }}')
      jobs:
      - template: terraform-job.yaml
        parameters:
          stage: production
          path: ${{ parameters.path }}
          dryRun: ${{ parameters.dryRun }}
  </code></pre>
  <p>In the example you can see two of the approached I tried (I tried a lot...). The last one (<code>in('prod', '${{ join(', ', parameters.stages) }}')</code>) actually compiles but then the check only works partially as the array gets converted into a single string: <code>'test,prod'</code> which will fail the <code>in('test', 'test,prod')</code> check.</p>
  <p>And the first example (<code>in('test', ${{ parameters.stages }})</code>) is the one I think should work with logical thinking but I get the following error when compiling the template: <code>/terraform-deployment.yml (Line: 19, Col: 16): Unable to convert from Array to String. Value: Array</code>.</p>
  <p>So now the question:</p>
  <h3>How do I check if a string is part of an array that was defined as a parameter?</h3>