Just find a desired object in yourArray and assign a desired value:
let yourArray = [];
yourArray.push({id: "8okCSIfrSTugwBW4Oa0Q", title: "My Title 1"});
yourArray.push({id: "8okCSIfrSTugwBW4Oa023", title: "My Title 2"});
yourArray.find(f=>f.id = "8okCSIfrSTugwBW4Oa0Q").images = [];
console.log(yourArray);
Or safer version with checking whether desired object is existing:
let yourArray = [];
yourArray.push({id: "8okCSIfrSTugwBW4Oa0Q", title: "My Title 1"});
yourArray.push({id: "8okCSIfrSTugwBW4Oa023", title: "My Title 2"});
let desiredObject = yourArray.find(f=>f.id = "8okCSIfrSTugwBW4Oa0Q");
if (desiredObject)
desiredObject.images = [];
console.log(yourArray);
UPDATE:
If you dont' have access to the ID in the addImage function, then this is the way via index:
yourArray[0].images = [];
In addition, you can find index via findIndex method:
let yourArray = [];
yourArray.push({id: "8okCSIfrSTugwBW4Oa0Q", title: "My Title 1"});
yourArray.push({id: "8okCSIfrSTugwBW4Oa023", title: "My Title 2"});
let index = yourArray.findIndex(f => f.title == 'My Title 1');
if (index != -1)
yourArray[index].images = [];
console.log(yourArray);
.keyworks but with["key"]it doesnot, just checked