title: How to change value if variable is nested array of objects? (example 2)
body: <p>I have a script for tests in which I pass values from the input to the result.</p>
  <pre><code>1.&quot;result&quot;: {
                      &quot;id&quot;: &quot;#id#&quot;,
                      &quot;number&quot;: &quot;#number#&quot;,
                          }
  
  
  &quot;methods&quot;: [
                  {
                      &quot;id&quot;: &quot;001&quot;,
                      &quot;input&quot;: {
                                &quot;id&quot;: &quot;2&quot;,
                                &quot;number&quot;: &quot;2585112&quot;}
  ]
  
  </code></pre>
  <p>If the result variable is an object, then values I replace the values with the as follows (it works):</p>
  <pre><code>if (result){
          for (var tag in result){
           var r=result[tag];
                  for (var inD in input) 
                  r = r.replace(`#${inD}#`, input[inD]);
                  result[tag]=r;  
  
  </code></pre>
  <p>How to change value if variable is nested array of objects? (example 2)</p>
  <pre><code>2. &quot;result&quot;: [
              {
                  &quot;id&quot;: &quot;#id#&quot;,
                  &quot;number&quot;: &quot;#number#&quot;,
                  &quot;status&quot;: &quot;Актуален&quot;,
              }
            ]
  </code></pre>