title: Get meta data attribute in javascript
body: <p>I am having trouble retrieving information from a meta tag.  I am trying to get an img src from a website and can't quite figure it out.  Here is an example of what I am trying to do.</p>
  
  <pre><code>&lt;meta property="og:image" content="http://foo.jpg"&gt;
  var image = document.querySelector('meta[property="og:image"]').getAttribute('content');
  </code></pre>
  
  <p>I have tried this but it doesn't work.  Any ideas?</p>