How do i click a button returned by elements command in night watch

```
client.elements('xpath', ".//a[@class='abcd')]", function (allButtons){
        console.log('Element value is '+element)
        allButtons.value.forEach(function (element) {
            this.elementIdClick(element, function(res){});
    }
}

```

While running i am getting an error as

> 
> Element value is [object Object]
> 
> 
> 
> ```
> TypeError: Object #<Object> has no method 'elementIdClick'
> 
> ```
> 
> 

So how do i get each element from the element list returned by `client.elements`

I realized the parameters for elementIdClick is wrong, i updated the code as

```
client.elements('xpath', ".//a[@class='abcd')]", function (allButtons){

allButtons.value.forEach(function (element) {
    console.log('Element value is '+element)
    this.elementIdClick(this.elementIdAttribute(allButtons.value[element].ELEMENT, 'id'), function(res){});

```

Now the error is

```
Element value is [object Object]
    TypeError: Cannot read property 'ELEMENT' of undefined

```

So again back to original question. How do i get individual elements from a list of webelements using nightwatchJS