Suppose I have a object,
var myObj = {
    "person": {
        "name": 'adam',
        "age": 25
        "email": {
            "address": "this@that.com",
            "ccOnNot": true
        }
     }
}
And I have an array
['person.name', 'person.age', 'person.email.address']
I want to loop the array and check if myObj has the fields in array.
How can this be achieved? I simply cant test like:
if myObj['person.name']
    console.log('hr')
 
     
     
     
     
    