When I was a little girl I always had a hamster or two. Here is what i learned about food.
Some vegetables that are good for your hammy are:
broccoli
cauliflower
parsley
turnips
carrots
spinach
~cabbage
~lettuce (not iceberg lettuce)
~ = small amounts only

They also like fruits but only give them a little a day. Such as

apples
grapes
tomato
pear

But you need to keep in mind that the fruits will go bad fast so do not keep them in there longer than a day.

If you have any more questions, just ask!