var $img = 0;
var arraySrc=[];
var main = function () {
var i = 0;
var url = "myurl";
$.getJSON(url, function (Response) {
flickrResponse.items.forEach(function (photo) {
$img = $('<img />', { id: 'img' + i, rc: photo.media.m, alt: 'MyAlt' });
var queryData = {src:$img.attr('src')}
arraySrc.push(queryData);
$("main .photos").append($img);
i++;
});
$(document).ready(main);