'How to import components in json file in reactjs

I'm going to convert my mock js files into json file but I'm facing with import components into json file >here is my sample code I want to import component from another file .


[
  {
    "id": 1,
    "Component": "DashboardPage",
    "title": "Dashboard",
    "pathname": "/dashboard",
    "role": ["ADMIN"],
    "hidden": true
  },
  {
    "id": 2,
    "Component": "DesignPage",
    "title": "Design",
    "pathname": "/design",
    "role": ["ADMIN"]
  },
  {
    "id": 3,
    "Component": "Generic",
    "title": "Docs",
    "pathname": "/docs",
    "role": ["ADMIN"]
  },
  {
    "id": 4,
    "Component": "ComponentsPage",
    "title": "Components",
    "pathname": "/components/overview",
    "role": ["ADMIN"]
  },
  {
    "id": 5,
    "Component": "Generic",
    "title": "Resources",
    "pathname": "/resources",
    "role": ["ADMIN"]
  }
]

Actually can I do this or is there any other solutions



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source