C
C
closetofail2021-03-03 00:26:52
Python
closetofail, 2021-03-03 00:26:52

How can I change this code (Review)?

The main task is to write an SQL query in sqlite to get movies and
all related entities, transform the data and load them into
the movies index in Elasticsearch.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaliy Orlov, 2017-12-01
@Veneomin

for (var i=0; i<arr1.length; i++) {
    for (var j=0; j<arr2.length; j++) {
         if (arr1[i].id == arr2[j].id_user) {
             arr1[i].sport = arr2[j].sport;
             break;
         }
    }
}

V
Valery, 2017-12-01
@it_monk

let newArray = [...arr1, ...arr2];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question