Use Object.entries()
function.
Object.entries(object)
return:
[
[key, value],
[key, value],
...
]
see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
{Object.entries(subjects).map(([key, subject], i) => (
key: {i} Name: {subject.name}
))}