Untitled
unknown
plain_text
23 days ago
268 B
2
Indexable
Never
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