I have the following array:

```
 const array = [
{operation: 'buy', succeeded: true},
{operation: 'sell', succeeded: false},
{operation: 'buy', succeeded: true}, 
{operation: 'buy', succeeded: false}
]

```

I want to make a function which will check the success rate (succeeded: true = success, succeeded: false = no success) of each parameter and calculate percent of success (the success rate is individual for the objects that already been checked and not for the whole array)

expected output:

```
 const fixedArray = [
{operation: 'buy', succeeded: true, successRate: 100%},
{operation: 'sell', succeeded: false, successRate: 50%},
{operation: 'buy', succeeded: true, successRate: 66%}, 
{operation: 'buy', succeeded: false, successRate: 50%}
]

```