Using split to display string in UI
Advertisements I have a string containing this value: 05/22/2023 46 hrs ago I need to display it in UI like this: Here is my code: <div> {fieldContent.split(" ")[0]}</div> <div> {fieldContent.split(" ")[1]} {fieldContent.split(" ")[2]} {fieldContent.split(" ")[3]}</div> which works fine. But, is there a different way to display this value instead of hardcoding 0, 1, 2, 3… Read More Using split to display string in UI