<script>
/*
object.keys()可以获取对象所有的属性
object.values()可以获取对象所有属性的值
*/
var obj = {
name:"李四",
age:39
}
var keys = Object.keys(obj)
var values = Object.values(obj)
console.log(obj)
console.log(values)
</script>
<script>
var arr ={
A:[{city:"武汉"},{city:"广州"}],
B:[{city:"深圳"},{city:"广州"}],
C:[{city:"上海"},{city:"武汉"}],
}
var values = Object.values(arr);
values.forEach(item=>{
console.log(item)
item.forEach(city=>{
console.log(city)
})
})
</script>