set animalRecords to {}
set animalList to {"Cat", "Dog", "", "Bird"}
set x to 0
repeat with thisCritter in animalList
set AppleScript's text item delimiters to {""}
if thisCritter as text is not "" then
set x to x + 1
set makeARecord to {"{rec", x, ": ", quote, thisCritter as text, quote, "}", return}
set animalRecords to animalRecords & (run script makeARecord as text)
end if
end repeat
return animalRecords
--{rec1:"Cat", rec2:"Dog", rec3:"Bird"}
--Would Give ListAnimals = {"Cat","Dog","","Bird"}
--I want ListAnimals = {"Cat","Dog","Bird"}