title: Store value in a variable via Knockout loop in html
body: <p>I am new to KO, in my html file I am printing a value like this -</p>
  <pre><code>&lt;!-- ko foreach: { data: JSON.parse($parent.options), as: 'option' } --&gt;
      &lt;!-- ko if: option.label === 'AAA' || option.label === 'BBB'  --&gt;
          &lt;dd class=&quot;values&quot; data-bind=&quot;html: option.value&quot;&gt;&lt;/dd&gt;
      &lt;!-- /ko --&gt;    
  &lt;!-- /ko --&gt;
  </code></pre>
  <p>And its working fine . But what I want is, I want assign all values of loop to a variable and want to print after loop. Like we do in php-</p>
  <pre><code>foreach($data as $key=&gt; $index){
      if($key==0)
          $var = $index['value'];
      else
          $var .= ' '.$index['value'];    
  }
  
  echo $var
  </code></pre>
  <p>I want to do the same in KO's html file using above KO loop.</p>