In my-scenario, I am trying to format the dataset values. Here, I have an array of data that I want to load it into dataset format. Here are the below code, which I am loading manually. I want to do better optimised, auto index load data, because index basis not a good approach, anytime data will be increase or decrease.
How to achieve auto load with the below dataset format?
const dataSet = [ { value: props.data[0], }, { value: props.data[1], }, { value: props.data[2], }, { value: props.data[3], }, { value: props.data[4], }, { value: props.data[5], }, { value: props.data[6], svg: { fill: Colors.WHITE, }, }, { value: props.data[7], },]