Changing some files from the old way to the newer way (ES6) for import statements. I have a statement like this that has a 'get' in it so it gets the whole JSON file that is at somefolder/somefolder/filename.
let variable = require('somefolder/somefolder').get('filename');
I want to change it to something like this:
import {Alert} from 'react-bootstrap';
or
import React from 'react';
Clarification that makes it a non-duplicate question. I want to use the import statement and the ".get" in one line of code (without functions like the previous solution) at the top of the file.