while (len >= 0) {
    var thisone = data[len];
    if (thisone.id) {
        var id = thisone["id"];
        var size = thisone[photoSize];