One of the key questions of infrared astronomy is how the characteristics of dust depend on the physical properties of the surrounding medium. To address this question, we present results from the Spitzer Space Telescope on two projects designed to study the dust properties of a sample of 25 Planetary Nebulae (PNe) in the Magellanic Clouds, and three well-known Giant Hii regions (NGC 3603, 30 Doradus and N 66/NGC 346). Most PNe show emission from polycyclic aromatic hydrocarbons (PAHs) and only two of them show amorphous silicates. Eleven PNe display a strong broad feature around 11 μm which is attributed to silicon carbide and 8 of them show magnesium sulfide. One PNe, SMP LMC 11, shows spectacular absorption bands due to molecules which are the precursors from which more complex hydrocarbons are formed. The Spitzer spectra of the Hii regions, NGC 3603, 30 Doradus, and NGC 346 are very rich, displaying a wealth of spectral features within each region. This not only allows us to compare the dust at different metallicities but also to study the spatial variations of many features across a given region and correlate it with the distance to the ionizing cluster(s) and other parameters.