title: Mule ESB : Traverse a json payload and make where clause condition for Salesforce
body: <p>Following is the input in terms of json payload and what is required is to form a where clause statement which I can use for salesforce query.</p>
  
  <p>Note: The number of query fields can vary from 1 to n.</p>
  
  <h2><strong>Input payload</strong></h2>
  
  <pre><code>{
  "object_type": "contact",
  "query_fields": [
  {
      "field_name": "CreatedById", "field_value": "005g0000003qelYAAQ"},
  {
      "field_name": "BillingState", "field_value": "KA"}
  ]
  }
  </code></pre>
  
  <p><strong>Sample output:</strong></p>
  
  <pre><code>#[json:query_fields[0]/field_name] = '#[json:query_fields[0]/field_value]' AND #[json:query_fields[0]/field_name] = '#[json:query_fields[0]/field_value]'
  </code></pre>