score:1

Accepted answer
const newArray = pairedData.map( ( group ) => {
    const urls = group.split( " " )[0];
    const comments = group.replace( urls, " " );
    return { url: "https://" + urls , comment: comments }
});
setData([...data, ...newArray])

Related Query

More Query from same tag