[Solved] How to read a JSON file in Javascript [closed]


JSON refers to JavaScript Object Notation, which is a data interchange format.
Your JSON is not properly formatted. A proper JSON object would look something like

[{"count": 1, "timestamp": 1257033601, "from": "theybf.com", "to": "w.sharethis.com"},{"count": 1, "timestamp": 1257033601, "from": "", "to": "agohq.org"}]

You can get the JSON from desired URL using $.getJSON(), like

$.getJSON( "Yoururl", function( data ) {})

You can then manipulate the data like data[0].count and use it as per your need

1

solved How to read a JSON file in Javascript [closed]