as you can see i have 2 arrays
var obj1 = [
"planet-1",
"planet-2",
"planet-3",
"planet-4"
]
and
var obj2 = [
"planet-1",
"planet-8"
]
i was find something like console.log(obj1 == obj2) will return true using stringify, that is almost close from i need but the problem is my json data not have exactly the same between obj1 and obj2, so when i use code like console.log(obj1) == obj2) the return will always false because of json data not have exactly the same.
so can someone please to help me how to figure it out how to make the result will return true if my "obj2" have atleast 1 or 2 data that the same like "obj1" even i have 1 array that not available in obj1?
im sorry i cant show any code for reference, cause i just find console.log(obj1) == obj2) who really close to what im lookin for.
thanks for helping.