```
Kotlin 1.4.21

```

I have a list of Products and I want to transform the price to a formatted string. However, the price doesn't change to the formatted one.

i.e.

```
orginal price: 1658

expected: "1,658.00"

actual: 1658

```

This is the class structure

```
data class Product(
    val productName: String,
    val price: Double)

```

Here I am using my list of projects and I want to transform the price.

```
listOfProjects.map {
    it.price.toAmount(2) // extension function that formats to 2 decimal places and converts to a string
}

if (listOfProjects.isNotEmpty()) {
    // Do something with the list. However, the price hasn't changed
}

```