title: Svg D3.js How to selectAll using condition
body: <p>Assume that there are lots of group (<code>&lt;g/&gt;</code>) elements in the page body. Some of these group elements have id, some of them not, however there is an interest only in those group elements which has an <code>id</code> which begins with string <code>foo</code>. </p>
  
  <p>How can you operate only on subset of selected elements?</p>
  
  <p>There is a need of something like this:</p>
  
  <pre><code>d3.selectAll("g").where(id like 'foo%')
  </code></pre>