Untitled

mail@pastecode.io avatar
unknown
plain_text
5 months ago
268 B
2
Indexable
 mainData.value = data.map(item => ({
        ...item,
        id: uuidv4(), // Generate unique ID for each item
        subData: item.subData.map(subItem => ({
          ...subItem,
          id: uuidv4() // Generate unique ID for each sub-item
        }))
      }));
Leave a Comment