title: how to dynamically set an value in json read from file in Karate
body: <p>I want to dynamically set value for some elements in JSON(read from a file) using data driven feature of KARATE framework. Here are more details:</p>
  
  <pre><code>request.json -&gt; { wheels : &lt;wheel&gt;, color: '&lt;color&gt;' }
  </code></pre>
  
  <p>Feature: Read json input from file and iterate over data table values</p>
  
  <p>Background:</p>
  
  <pre><code>* url ''
  * def reqJson = read('request.json') 
  * print reqJson
  </code></pre>
  
  <p>Scenario Outline: Test file read</p>
  
  <pre><code># I want to avoid writing below set statements for each element in request
  #* set reqJson.wheels = &lt;wheel&gt;
  #* set reqJson.color = '&lt;color&gt;'
  
  Given path ''
  And request reqJson
  When method POST
  Then status 200
  And match response contains {mode: '&lt;result&gt;'}
  
  Examples:
  
  | wheel | color | result  |
  | 4     | red   | car     |
  | 2     | any   | bicycle | 
  </code></pre>
  
  <p>I am developing automation framework using Karate, my intention is to save sample request in JSON file for a given API and then during execution I want element values to be replaced with the ones given in the table above.I don't want to write set statement for each element either(commented lines above)</p>
  
  <p>P.S.: I tried with calling other feature file using table approach. However, I want to keep one feature file per API, hence want to know if there is any way possible for the above approach</p>