For a given name that I'm getting from an API (for example "large_banner"), I need to import the corresponding component (in this case, "LargeBanner") in my application.
So I created an array connecting each API name to each component name:
componentNames: [
{ index: 'ButtonSection' },
{ large_banner: 'LargeBanner' },
{ small_banner: 'SmallBanner' }
]
Given "large_banner" (for example), how do I get "LargeBanner" in this array? Is there a simple way to achieve that in ES6?