title: How to parse SVG element's viewBox x, y, width and height values?
body: <p>Suppose I have an SVG element :</p>
  
  <pre><code>&lt;svg id="myMap" viewBox="0 0 200 200"&gt;&lt;/svg&gt;
  </code></pre>
  
  <p>How would I get get a specific value
  of myMap's viewBox? For a simplified example : how to get the "x" value of the viewBox attribute of myMap? (for the above example, the x value is the first zero (0)).</p>
  
  <p>Below is some variation of syntax I've tried :</p>
  
  <pre><code>&lt;script&gt;
    var myMap = Snap("#myMap");
    alert(myMap.attr("viewBox"));//dislays [object Object]
    alert(myMap.attr("viewBox.vbx"));//also dislays [object Object]
    alert(myMap.attr("viewBox.x"));//also dislays [object Object]
  &lt;/script&gt;
  </code></pre>
  
  <p>All the above examples display [object Object] on the alert box.<br>
  I need the proper float value of x, y, width and height of the viewport to implement zoom in and out functions in a map.</p>