I got an array with objects inside it, and these objects got elements inside them. How will I address one of these objects by one of the elements?
let randomARR = [];
let a = {"name": "John", "age": 20, "PlaceOfBirth": "Germany"};
let b = {"name": "Simon", "age": 20, "PlaceOfBirth": "France"};
let c = {"name": "Michael", "age": 20, "PlaceOfBirth": "USA"};
randomARR.push(a);
randomARR.push(b);
randomARR.push(c);
result:
[{"name": "John", "age": 20, "PlaceOfBirth": "Germany"}, {"name": "Simon", "age": 20, "PlaceOfBirth": "France"}, {"name": "Michael", "age": 20, "PlaceOfBirth": "USA"}]
Let's say I would like to remove object b (name: Simon) out of the array by addressing the object by it's element "name", and not the it's position at the array.