0

I am trying to read the results from a $.getJSON() request.

The results are here...

http://api.giphy.com/v1/gifs/search?q=funny+cat&api_key=dc6zaTOxFJmzC&limit=1&offset=0

I am trying to get the value of bitly_gif_url using

$.each(data, function(index) {
            console.log(data[index].bitly_gif_url);
        });

But it just returns undefined. I have tried different ways to get to the data but i am struggle and kindly request any suggestions thanks

Eugene
  • 10,957
  • 20
  • 69
  • 97
AttikAttak
  • 797
  • 4
  • 12
  • 20

1 Answers1

0

If your domain is not http://api.giphy.com, then you are trying to make a cross-domain Ajax request. Cross-domain requests are prohibited by most browsers. Please read more at http://api.jquery.com/jQuery.ajax/ -> crossDomain

Alex
  • 1,605
  • 11
  • 14
  • i thought this was dependent on the other server settings, and usually if i come across this issue i see an error message, also i can actually output the console.log(data) i just cant exact the bitly_gif_url... but thanks for your suggestion – AttikAttak Sep 05 '13 at 16:47