title: Processing conditions based on context variables in Watson Conversation Service
body: <p>Is it possible to set the value of a context variable based on a set of conditions which depend on value of another context value? I am trying to integrate NLU(Natural Language Understanding) service with Conversation service and would like to set some context variables based on the values returned by NLU. For example I am getting following entities from NLU:</p>
  
  <pre><code>{
  ...
  "context": {
      ...
      "nlu_response": {
          "entities": [{
              "type": "Person",
              "relevance": 0.5,
              "count": 1,
              "text": "Jon Doe",
              "emotion": {
                  "anger": 0.082378,
                  "disgust": 0.033499,
                  "fear": 0.072588,
                  "joy": 0.100971,
                  "sadness": 0.147584
              },
              "sentiment": {
                  "score": 0.409803
              }
          },
          {
              "type": "Person",
              "relevance": 0.5,
              "count": 1,
              "text": "Jane Doe",
              "emotion": {
                  "anger": 0.140151,
                  "disgust": 0.091598,
                  "fear": 0.059244,
                  "joy": 0.046762,
                  "sadness": 0.165763
              },
              "sentiment": {
                  "score": 0
              }
          }]
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and would like to create a context variable EntityPerson_1 with a value of "Jon Doe" only if there are values in entity object with type="Person".
  In other words is something like this possible in a response node:</p>
  
  <pre><code>{
  ...
  "context": {
      ...
      "EntityPerson_1": &lt;? context.nlu_response.entities.size()&gt;0 &amp;&amp; context.nlu_response.entities.get(0).type.contains('Person')?context.nlu_response.entities.get(0).text:'' ?&gt;
  }
  </code></pre>
  
  <p>}</p>