You can lose weight eating pretty much anything if it still adds up to an overall deficit, although obviously how much of a deficit, dietary content and what type of physical activity you partake in will have an influence on what the weight loss consisted of.
Generally the more processed/packaged the food, the harder it is to eat any great quantity of it while still being able to hit targets for protein/carbs/fats. If you're dieting then a hearty portion of chips might take out a good chunk of your carb and some of your fat intake, leaving you with less food / more mundane choices for other meals that day but there's no reason why you can't squeeze some in now and then. 80/20 rule / orthorexia nervosa etc.