I have a JSON file that looks something like this:

```
{
  "apples": 98,
  "pears": 39,
  "grapes": 92,
  "watermelons": 16,
  "oranges": 46,
  "bananas": 32
}

```

I'd like to update the value of each key. I currently do it like this:

```
datafile = open("fruitdata.json", "r")
fruitsdata = json.load(datafile)
datafile.close()

fruitsdata["apples"] = 23
fruitsdata["pears"] = 47
fruitsdata["grapes"] = 72
fruitsdata["watermelons"] = 74
fruitsdata["oranges"] = 18
fruitsdata["bananas"] = 84

datafile = open("fruitdata.json", "w")
json.dump(fruitsdata, datafile, indent=2)
datafile.close()

```

How can I do it without me typing manually every line to be updated?

I thought of maybe using a `for` loop along with a list that contains all the new values.

```
newFruitValues = [23,47,72,74,18,84]

```

The loop checks the value of each key in `fruitsdata` and then updates them with the values from the list. But I don't know how to go about it.