In most jurisdictions, you can legally take anything from a trash container. We have more information about dumpster diving and more here. However, if you want to maintain a good relationship with your neighbors, don't pick through their trash without asking them.