Question: In my data set there is a field that is currently a character field and I need to convert it to a numeric one. the problem is not only are there '%' signs hard coded in the data but there are decimal points in there as well and places after the decimal points is not consistent. AKA...

```
    42.01%
      8.1%
       22%
      .05%

```

I substringed off the % sign but is there a way to just cut the decimal point off and everything after it so then I can just cast it as an integer?

thanks all

Answer: 
You could use [`_.some`](https://lodash.com/docs#some), when the function passed returns a truthy value iteration will stop and true will be returned. If it can't find a truthy value it will return false, after iterating through the entire array.

Example:

```
_.forEach(self._connectedClients, function(client) {
    if (client.authenticated) {
        if (_.some(client.interests, _.method('test', evt.event_type))) {
            self._sendJSON(client.socket, data);
        }
    }
});

```
Just use [`Array#some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some):

> 
> `some()` executes the callback function once for each element present in the array until it finds one where callback returns a true value. If such an element is found, `some()` immediately returns `true`. 
> 
> 
> 

```
var interested = client.interests.some(function(regex) {
  return regex.test(evt.event_type);
});

```

Of course you can also use lodash's `_.some` implementation.