title: How to add new key in json using karate.set()
body: <p>Hi i am trying to add new key and value to json using karate.set but its not working getting exception as invalid varibale name, below is my code:</p>
  
  <pre><code>Backgroung:
  * def myjson = {name: 'test', start_date: '27-04-2017'}
  * def localDateTime = Java.type("java.time.LocalDateTime").now()
  Scenario:
   * string endDate = 'myjson.end_date'
   * def endDateTmp = karate.eval(endDate)
   * eval if (endDateTmp == null) karate.set(myjson,'$.end_date',localDateTime)
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>java.lang.RuntimeException: javascript evaluation failed: if (endDateTmp == null) karate.set(myjson,'$.end_date',localDateTime)
      at com.intuit.karate.ScriptBindings.eval(ScriptBindings.java:115)
      at com.intuit.karate.ScriptBindings.updateBindingsAndEval(ScriptBindings.java:103)
      at com.intuit.karate.ScriptBindings.evalInNashorn(ScriptBindings.java:88)
      at com.intuit.karate.Script.evalJsExpression(Script.java:362)
      at com.intuit.karate.StepDefs.eval(StepDefs.java:581)
  Caused by: java.lang.RuntimeException: invalid variable name: {name:test, start_date:27-04-2017}
  at com.intuit.karate.Script.validateVariableName(Script.java:553)
      at com.intuit.karate.Script.setValueByPath(Script.java:1480)
      at com.intuit.karate.Script.setValueByPath(Script.java:1455)
      at com.intuit.karate.ScriptBridge.set(ScriptBridge.java:101)
      at jdk.nashorn.internal.scripts.Script$23$\^eval\_.:program(&lt;eval&gt;:1)
  </code></pre>
  
  <p>If key already exist then trying to set is working, please suggest me how to add new key using karate.set() or any other way to do it.</p>
  
  <p>Thanks in advance.</p>