Works with arrays and hashes