retrieving recent ads function to return Json array