I am trying to use a variable when I fetch a array of code to create my menu with the IDs.
Here is the beginning of my function
// Constants import - fixtures
import {dummyData, trendingData, COLORS, FONTS} from '../constants';
export default function ScrollXBar({
  secondary,
  setSecondary,
  COUNTRIES_ITEM_SIZE,
  primary,
  mainScrollX,
  database,
Here is where I create the Menu
        // Set Place
        setSecondary([
          {id: -1},
          ...dummyData.primary[position].secondary,
          {id: -2},
        ]);
      }}
I would like to remplace "dummyData" object by the variable "database" which is the name of another depending on what was passed in the component.
 
    