I want to display an array as a string which is seperated by commas in react native. This is my code.
let currentWorkout = this.props.currentWorkout;
// tools is an array. want to display it as valueOne, valueTwo, valueThree etc.
let tools = JSON.stringify(currentWorkout.tools);
return (
<View style={styles.container}>
<WorkoutDetail
workout={this.props.currentWorkout}
workoutImage={currentWorkout.workoutImage}
onPressWorkout={() => alert("CONTINUE WORKOUT")}
/>
<View style={styles.workoutInfo}>
<KeyValueText header="Tools" value={tools} /> ////
</View>
</View>
How can I achieve this?