title: condition in Transform Message - Mule
body: <p>I want to transform message in mule application based on some condition.</p>
  
  <pre><code>%dw 1.0
  %output application/json
  ---
  {
      **// create the below if the size of payload is greater than 0**
      resource_type : "speciality",
      speciality_name : payload[0].speciality_name,
      speciality_description : payload[0].speciality_description,
      uuid : payload[0].uuid
  
     **//else create the below message**
     message : "No records were fetched from backend"
  }
  </code></pre>
  
  <p>Could any one please kindly help me on this?.</p>