I have a array of objects. the object contains:
code
name.
example:
var fullList = [
{"code":10,"name":"example 10"},
{"code":50,"name":"example 50"},
{"code":60,"name":"example 60"}
]
I have another array with only code, like:
var filterBy = [10, 50]
I want to create 2 new array:
First - contains only objects that their code in "filterBy"
Second - contains only objects that their code not (!) in "filterBy"
how can i do it?
Thank you