1//Initailize array of objects.
2let myArray = [
3 {id: 0, name: "Jhon"},
4 {id: 1, name: "Sara"},
5 {id: 2, name: "Domnic"},
6 {id: 3, name: "Bravo"}
7],
8
9//Find index of specific object using findIndex method.
10objIndex = myArray.findIndex((obj => obj.id == 1));
11
12//Log object to Console.
13console.log("Before update: ", myArray[objIndex])
14
15//Update object's name property.
16myArray[objIndex].name = "Laila"
17
18//Log object to console again.
19console.log("After update: ", myArray[objIndex])
1receivedRates.indices.forEach{ receivedRates[$0] *= Double(inputTextField.text!)! }
2