export const parseAllTrainDiagram = (text:string) => {
  const val = text.replace("[\r\n", "").split(",\r\n");
  let trainDiagram = {};
  val.forEach((element) => {
    try {
      let data = JSON.parse(element);
      Object.keys(data).forEach((key) => (trainDiagram[key] = data[key]));
    } catch (e) {}
  });
  return trainDiagram;
};
