Javascript Loop Through Array From Json To Pdf