I have a scenario wherein i have

```
var data = [
    {
        "x": 1,
        "y": 0.27,
        "classifier": 1
    },
    {
        "x": 2,
        "y": 0.88,
        "classifier": 1
    }
]

```

I want another object data2 with y=1-y, which i obtain with:

```
var data2 = data.map(function(el) {el.y = 1-el.y; return el});

data2[0]
Object {x: 1, y: 0.73, classifier: 1}

data2[1]
Object {x: 2, y: 0.12, classifier: 1}

```

which is the correct form that i want the data in. However the issue is i want to preserve the original data as well. Right now even data has mutated data.

```
data[0]
Object {x: 1, y: 0.73, classifier: 1}

data[1]
Object {x: 2, y: 0.12, classifier: 1}

```

Is map the right function to use here? Am i using it correctly?