<script>
var list = { 0: 'aaa', 1: 'bbb', 2: 'ccc' }
var array = []
array = Object.keys(list).map(val => ({
key: val,
val: list[val]
}))
console.log(array)
</script>

Js把键值对象转换成数组_h