Solved: What the getAllStacks() method does is returns a table full of dictionaries. So, to get the name of the item in stack one, you would do this:
chest = peripheral.wrap("right")
chestInv = chest.getAllStacks()
item1 = chestInv[1]
print(item1["name"]) --Because name is the term and the value is the name of the item.
this above code will print the name of the item in the first slot of chest.