I have two objects below.
As you see, how can I check the objectB belongs to the objectA or not because all the fields of both object are the same, and the casts field of the objectB is a child of the casts field of the objectA.
ObjectA = {
title: 'Alita: Battle Angel',
year: '2019',
casts:
[ 'Rosa Salazar',
'Christoph Waltz',
'Jennifer Connelly',
'Mahershala Ali',
'Michelle Rodriguez',
'Casper Van Dien' ] }
ObjectB = {
title: 'Alita: Battle Angel',
casts:
[ 'Rosa Salazar',
' Christoph Waltz' ],
year: '2019' },