import data from "./data.json" ; import { IDataUnit } from "./interfaces" ; const UNITS_BY_ID = { } ; data . Unit . forEach ( ( unit ) => { UNITS_BY_ID [ unit . id ] = unit ; } ) ; export default UNITS_BY_ID ;