Say, for example, you have an array of JSON objects that contains the following data:

var arrOfObjects = [
        name: "John Doe",
        age: 20,
        email: ""
        name: "Bob Smith",
        age: 56,
        email: ""

Hmm, that's pretty basic but how will get the information of "Bob Smith" using his email? Well, that's where the Array.find() method comes into the picture.

Try reading the Mozilla Documentation on Array.prototype.find() and implement the following:

var key = "email";
var valueToFind = "";
var result = arrOfObjects.find(obj => {
    return obj[key] == value;

//This should give you the record of Bob Smith.

This works fine on all browsers except Internet Explorer (I mean, it sucks anyways!), which is okay!

Hope you found this useful!