title: How to read json file in gitlab ci yaml and use if else command?
body: <p>I have a yaml file and I have a respond for yaml file.Respond file have a message part.and I need if message is true return Job Succeed for yaml file if message writes wrong yaml file is not succeed</p>
  
  <pre><code>variables:
    NUGET_PATH: 'C:\Tools\Nuget\nuget.exe'
    MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\amd64\msbuild.exe'
    SOLUTION_PATH: 'Textbox_ComboBox.sln'
  
  stages:
    - build
    - job1
    - job2
  
  before_script:
    - "cd Source"
  
  build_job:
    stage: build
    except:
      - schedules
    script:
      - '&amp; "$env:NUGET_PATH" restore'
      - '&amp; "$env:MSBUILD_PATH" "$env:SOLUTION_PATH" /nologo /t:Rebuild /p:Configuration=Debug'
  
  job1:
    stage: job1
    script:
      - 'curl adress1'
      -  -  if [ "$message" == "SAP transfer started. Please check in db" ]; then exit 0; else exit 1; fi
  
  
  job2:
    stage: trigger_SAP_service
    when: delayed
    start_in: 5 minutes
    only:
      - schedules
    script:
      - 'curl adress2'
  </code></pre>
  
  <p>It is yaml file respond.It should be job succeed.Because respond message and if command message is same.</p>
  
  <pre><code>Skipping Git submodules setup
  Authenticating with credentials from job payload (GitLab Registry)
  $ cd Source
  $ curl adress1
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100   146    0   146    0     0    877      0 --:--:-- --:--:-- --:--:--   879
  {"status":200,"message":"SAP transfer started. Please check in db","errorCode":0,"timestamp":"2019-10-04T07:59:58.436+0300","responseObject":null}$ if ( [ '$message' == 'SAP transfer started. Please check in db' ] ); then exit 0; else exit 1; fi
  ERROR: Job failed: exit code 1
  </code></pre>