I have a list of string values, they represent the identifiers of the fields that I want to add to a class.

**For example:**

I have a string array:

```
let stringArr = ['player1score', 'player2score', 'player3score'];

```

After some conversion code, I want the result to be like:

```
{player1score: 100, player2score: 100, player3score: 100}

```

What should I do?

```
let row = {};
stringArr.forEach(player => {
    // What should I do here?
    // something like row.addProp(player, score)?
});

```

**Note:**

I have to do this conversion because I need to display a graph of the data using v-charts, and the final rows data would have to look like this:

```
let rows = [
    {time: ..., player1score: ..., player2score: ..., player3score: ...},
    ...
];

```