Shouldn't your JSON return values be double quoted"?

[ {"Value": 1, "Item": "Physics"}, {"Value": 2, "Item": "Chemistry"},
{"Value": 3, "Item": "Biology"} ];

On Mar 26, 9:16 am, iceangel89 <iceange...@gmail.com> wrote:
> i am trying to load json. but it seems like its not working. nothing
> is alerted. supposed to be the case?
>
> <script type="text/javascript">
> $(function() {
>         $.getJSON("data.js", function (json) {
>                 alert(json);
>         });});
>
> </script>
>
> data.js
> [ {Value: 1, Item: Physics}, {Value: 2, Item: Chemistry}, {Value: 3,
> Item: Biology} ];

Reply via email to