Dummy javascript, JSON and loop question

Here is a JSON file:

[{"userNameDup":0,"emailDup":1}]

Here the code to retrieve the objects:

   $.getJSON('inc/admin/json/duplicates.json', function ($data) {
                                
                                alert($data[0].emailDup);
                                
                                });

As expected up pops up 1… but twice?!

Why is it looping through the data twice?

I just want to check once…

(I’ve tried various different loops with breaks)

Is the getJSON part being executed twice??

It is. What’s the best non-$.getJSON method of parsing and reading JSON files?

If $.getJSON is being executed twice, then JSON is not the problem.

The problem is further up in the code, which we can help you with if you link us to a test version of the page that’s having the problem.

The same problem will occur regardless of which technique you use to retrieve the data. Let us help you to find out the cause of the problem, and the problem will be rapidly solved.