I have an array of objects:
const arr = [ { a: value1, b: value2, .......... }, { a: value1, b: value2, c: value3, ......... }, {........, ........, ........, ........, } ] The number of properties in each object changes, I need to render the values โโof these properties in 3 columns, this is how I do it now:
render(){ const columns = arr.map((item) => { return( <div className={column}> {item.a ? <span>{item.a}</span> : ''} {item.b ? <span>{item.b}</span> : ''} ..................... ..................... </div> ) }) } return( {columns} ) How do I, through the function, render those spans, in which there are values, more optimally and more correctly?