With a baby with eczema how do you know which foods the baby is allergic to, without trying out 30 different foods?

You don't. First of all, food allergy is not the only cause of eczema, by a long shot, despite what you read on the web. Assuming your baby does have a food allergy, there's really no way around trial and error to find the culprit. But before you go to all that trouble, you might want to see a dermatologist, who may be able to pinpoint another cause of your child's eczema.
Don't. Some estimate as many as 1/3 of kids with eczema could have food allergies that contribute to the problem.There are blood tests that screen for the major foods & these could be used as a guide to select foods for exclusion. High IgE levels to any food would be worrisome and worthy of a consultation with an allergist. The correlation between any such test & true sensitivity yes or no is not perfect.