Reputation: 55
I have an array of object
const arr = [
{ id: 1, value: "Apple" },
{ id: 1, value: "Orange" },
{ id: 1, value: "Pine Apple" },
{ id: 1, value: "Banana" },
];
I want to loop through this array and get all the fruit names as a single string every fruit will separated with comma. But don't know how to do that. Does anybody help me to do this?
Upvotes: 0
Views: 5242