如何在Javascript中将对象数组的对象转换为对象数组

Lim*_*eat 0 javascript arrays object

我有对象数组的对象

{
  "94":[{"Full Name":"Phalla Morn"}],
  "95":[{"Full Name":"Pum Chhenghorng"}],
  "99":[{"Full Name":"Proen Pich"}]
}
Run Code Online (Sandbox Code Playgroud)

我想将其转换为对象数组:

[
  {"Full Name":"Phalla Morn"}, 
  {"Full Name":"Pum Chhenghorng"},
  {"Full Name":"Proen Pich"}
]
Run Code Online (Sandbox Code Playgroud)

请帮忙.

Ori*_*ori 6

获取内部数组Object.values(),并通过扩展Array.concat()以下内容展平:

const arr = {"94":[{"Full Name":"Phalla Morn"}],"95":[{"Full Name":"Pum Chhenghorng"}],"99":[{"Full Name":"Proen Pich"}]};
    
const result = [].concat(...Object.values(arr));

console.log(result);
Run Code Online (Sandbox Code Playgroud)