# Pm.expect deep equals not comparing child properties

**URL:** <https://community.postman.com/t/pm-expect-deep-equals-not-comparing-child-properties/25893>\
**Category:** Help Hub\
**Created:** [July 19, 2021, 3:24pm UTC](https://community.postman.com/t/pm-expect-deep-equals-not-comparing-child-properties/25893 "2021-07-19T15:24:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akram\_Shaik](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Akram\_Shaik](https://community.postman.com/u/Akram_Shaik)\
**Post date:** [July 19, 2021, 3:24pm UTC](https://community.postman.com/t/pm-expect-deep-equals-not-comparing-child-properties/25893/1 "2021-07-19T15:24:58Z")

</div>

i am trying to compare two json responses using deep.equals(). But its just comparing level-1 properties alone. Child properties are not being compared. Even though there are difference in child properties test passed.

**Response-1:**

```auto
{ "context": {
        "property-1": {
            "testProp": false,
            "testProp2": null,
        },
        "notes": null,
    },
    "FirstName": "Name-1",
	"id":"value-1",
	"createdValues":{
		"createTime":1234567,
		"updateTime":2345677
	}
}

```

**Response-2**

```auto
{ 
    "context": {
        "property-1": {
            "testProp": false,
            "testProp2": null,
        },
        "notes": null,
    },
    "firstName": "Name-2",
	"id":"value-2",
		"createdValues":{
		"createTime":456778,
		"updateTime":2345677
	}
}

```

var ignoreFields=[“id”];  
pm.test(“Validate response”, pm.expect(response1).to.not.include(ignoreFields).to.deep.equals(newResponse));

above statement comparing only “id” even though there is difference in other properties(createTime) test passed successfully. Is there anything needs to be added or anything i am missing
