How to use an array of objects and specify the keys to use?

Trying to use the react component, but I don’t see how to use an array of objects.

In the example below how do I use the data constant as the data source? Obviously, I can run a loop to restructure it in the expected format, but this just wastes resources and not viable for large arrays.

const data = [
        {
            uv: 4000,
            pv: 2400,
        },
        {
            uv: 3000,
            pv: 1398,
        },
        
    ];

 <Plot
            data={[
                {
                    x: [1, 2, 3],
                    y: [2, 6, 3],
                    type: 'scatter',
                    mode: 'lines',
                    marker: { color: 'red' },
                },
            ]}
            layout={{ title: 'A Fancy Plot' }}
        />