Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/jsonld@2.0.2/dist/jsonld.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
  <script type="application/ld+json">
    {
      "@context": {"@vocab": "http://example/"},
      "foo": "&lt;&amp;&gt;"
    }
  </script>
  <script>
    let datablock = document.querySelector('script[type="application/ld+json"]').textContent;
    jsonld
      .expand(JSON.parse(datablock))
      .then(JSON.stringify)
      .then(console.log);
  </script>
</head>
<body>
</body>
</html>
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers