M
M
Martin2016-07-12 16:18:57
JavaScript
Martin, 2016-07-12 16:18:57

Are Apple resources stored on the Amazonas.com domain?

When downloading photos from the iCloud disk, the resource eu-irl-00001.s3.amazonaws.com is constantly accessed

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Kusmich, 2016-01-23
@Kusmich

To filter arrays, you can use the Array.prototype.filter function
To filter by a specific field

var search = "text"
var result = arr.filter(function(el){
    return el.fieldName.indexOf(search) > -1;//fieldName - поле по которому нужно фильтровать
});

If you need to search for all fields at once, then the filter function can be modified, for example, like this
var search = "text"
var result = arr.filter(function(el){
    for(var field in el){
        if(el[field].indexOf(search) > -1){
            return true;//если нашли хотя бы одно поле содержащее искомую строку, оставляем объект
        }
    }
    return false;
});

A
Alex Pts, 2016-01-23
@AlexPTS

lodash has a number of methods for filtering a collection of objects by parameters.
// using the `_.matches` iteratee shorthand
_.filter(users, { 'age': 36, 'active': true });
First, you filter all the data according to the desired condition, the output is a slice of data. And you deduce already separately from search/filtering.

S
sim3x, 2016-07-12
@sim3x

stored

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question