File size: 363 Bytes
f0dc1c3
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
export function parseJsonList(content: string): string[] {
  // Extract JSON array from the content
  const start = content.indexOf("[");
  const end = content.lastIndexOf("]");
  const jsonContent = content.slice(start, end + 1);

  // Parse as JSON into array of strings
  let objects: string[] = [];
  
  objects = JSON.parse(jsonContent);

  return objects;
}