Question: I have got null when I search for the src attribute of an image. Please resolve the element identification for the image. 

My Selenium WebDriver code to identify the image src using WebDriver:

```
@FindBy(xpath = "//div[contains(@class, 'image-section')]/img")
private WebElement getimage;

public String getImageSrc(){
    return  getimage.getAttribute("src");
}

```

I have the following exception: 

```
org.openqa.selenium.NoSuchElementException: no such element:

```

Answer: 
Using `filter`: 

```js
var people = [
    { name: "Sue", surname: "Beckett", age: 50},
    { name: "Bill", surname: "Borough", age: 44},
    { name: "Janet", surname: "Jupp", age: 23},
    { name: "Peter", surname: "Pepper", age: 21},
    { name: "Samantha", surname: "Salad", age: 17}
];

function person(personName) {
    var user = people.filter(function (user) {
       return (user.name.toLowerCase() == personName.toLowerCase());
    });
    return user[0] !== undefined ? user[0] : 'not found';
}

console.log(person('sue'));
```
```js
var people = [
  { name: "Sue", surname: "Beckett", age: 50},
  { name: "Bill", surname: "Borough", age: 44},
  { name: "Janet", surname: "Jupp", age: 23},
  { name: "Peter", surname: "Pepper", age: 21},
  { name: "Samantha", surname: "Salad", age: 17}
];

function person(name) {
  people.map((data,index)=>{
    if(data.name == name)
    {
      console.log(data.name);
      console.log(data.surname);
      console.log(data.age);
      return;
    }
  })
}

person("Sue");
```