title: Data URI to JSON in Javascript?
body: <p>I am facing a problem where my server app gets a JSON's DataURI and I would like to parse it into a JSON again. How could I do this? I tried different things but nothings seems to work. I tried simply parsing it or <code>encodeURI(data);</code> but still I can't get the original JSON.</p>
  <p>This is the Data URI:
  <code>data:application/json;base64,ew0KICAgICJtYWx0X3R5cGUiOiAibG9nIiwNCiAgICAibWFsdF9kYXRhIjogIldvdywgdSByIGFsbW9zdCB0aGVyZSA6TyINCn0=</code></p>
  <p>I tried this to encode it too:</p>
  <pre><code>var data = 'data:application/json;base64,ew0KICAgICJtYWx0X3R5cGUiOiAibG9nIiwNCiAgICAibWFsdF9kYXRhIjogIldvdywgdSByIGFsbW9zdCB0aGVyZSA6TyINCn0=';
  Buffer.from(data.toString('utf8'), 'base64').toString('ascii')
  </code></pre>
  <p>But I get this if I log it on console: <code>u+Zje   F- J'm+k0P&quot;&amp;VGEwGR#&quot;&amp;Fvr&quot;@P&quot;&amp;VGEvFF#&quot;%vwrBR&quot;FVw7BFW&amp;R$r P'</code></p>