export function toMap(value: string) { // `value` is a string const mapLike = JSON.parse(value) as Iterable; // `mapLike` should be an array or similar return new Map(mapLike); }