1)新建hash hash= { name : "image", "number" : "image" } 2)获取hash值的方法: hash["name"] 或 hash.number 无论key是对象名还是字符串都能通过这两种方法获取 转载于:https://www.cnblogs.com/znsongshu/p/6079488.html