const StringToObj = (value) => {
  if (value && typeof value == "string") {
    try {
      const obj = JSON.parse(value);
      if (typeof obj == "object") {
        return obj;
      } else return value;
    } catch (e) {
      return value;
    }
  } else return value;
};

export { StringToObj };
