i can't get array b of object a with reduce in js
can you help me find the error?
const a = {
dias:"valor",
horas:"valor"
}
const b = campos.reduce((acc, el) => ([...acc, {
title: el, field: el
}]), {})
desired result = [
{ title: 'dias', field: 'dias' },
{ title: 'horas', field: 'horas' },
]