I am trying to read the contents of a JSON file in Javascript, but I can't get any method working.
The JSON is included in a script tag:
<script id="data" type="application/json" src="https://example.com/file.js"></script>
The file contains just JSON, but is not in my domain. More specifically, I'm trying to get the data from the Gravatar Profile API. The format is like in this example: http://es.gravatar.com/205e460b479e2e5b48aec07710c08d50.json?callback=test
The thing is, I can read the content once, inside a function, thanks to the callback parameter, but I need to read it again in another function.
How shoud I do it?
Thanks in advance.