Created JSON backend loop for jQuery