# Missing Attributes

**URL:** <https://community.postman.com/t/missing-attributes/15594>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [September 3, 2020, 9:16pm UTC](https://community.postman.com/t/missing-attributes/15594 "2020-09-03T21:16:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbaker](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dbaker](https://community.postman.com/u/dbaker)\
**Post date:** [September 3, 2020, 9:16pm UTC](https://community.postman.com/t/missing-attributes/15594/1 "2020-09-03T21:16:43Z")

</div>

I am using the following code to assert on a response field and this code was working just fine a couple of days ago and now it is failing.

pm.test(‘my variable’, function() {  
var jsonData = pm.response.json();  
pm.expect (jsonData.applicationData.myvariable).is.to.equal(pm.environment.get(‘myvariable’);

I then did a console.log on the pm.response.json and when the data was returned in the console I noticed there were a bunch of missing attributes. If I POST the call via Postman and manually view the response I can see all the attributes. So I was wondering if there is an issue with Postman and using the pm.repsonse.json to where it is maybe not properly parsing the response? If not, I’ll continue to look on our side to see what could have possibility changed.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 3, 2020, 9:25pm UTC](https://community.postman.com/t/missing-attributes/15594/2 "2020-09-03T21:25:50Z")

</div>

Putting the test code and logging out the data from `pm.response.json()` to one side.

Do you see the expected data in the response view?

The test sounds like it’s doing exactly what it’s supposed to be doing and acting as a change detector - Something has changed the shape of the response data.

One thing that you could do moving forward, it to create some schema validation tests, that would allow you to see what’s changed against a known schema.

---

<div class="post-metadata">

**Author:** ![dbaker](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dbaker](https://community.postman.com/u/dbaker)\
**Post date:** [September 3, 2020, 9:33pm UTC](https://community.postman.com/t/missing-attributes/15594/3 "2020-09-03T21:33:03Z")

</div>

Yes I can see the correct attributes in the response view. I just don’t see all the attributes in the response from the pm.repsonse.json.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 3, 2020, 9:39pm UTC](https://community.postman.com/t/missing-attributes/15594/4 "2020-09-03T21:39:36Z")

</div>

Can you post a screenshot on the 2 things that you see please?

Does the endpoint have a filter? Any pagination?

Do you see the same from:

```auto
console.log(pm.response.text()) 

```

---

<div class="post-metadata">

**Author:** ![dbaker](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dbaker](https://community.postman.com/u/dbaker)\
**Post date:** [September 3, 2020, 9:54pm UTC](https://community.postman.com/t/missing-attributes/15594/5 "2020-09-03T21:54:33Z")

</div>

No filter or pagination I am aware of but will ask on that. Checking the pm.reponse.text now.

---

<div class="post-metadata">

**Author:** ![dbaker](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dbaker](https://community.postman.com/u/dbaker)\
**Post date:** [September 3, 2020, 10:00pm UTC](https://community.postman.com/t/missing-attributes/15594/6 "2020-09-03T22:00:07Z")

</div>

Okay I can see the missing attributes with the pm.reponse.text()

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 3, 2020, 10:01pm UTC](https://community.postman.com/t/missing-attributes/15594/7 "2020-09-03T22:01:45Z")

</div>

Without showing/displaying a visual comparison of what the response is and what you’re getting from the console log statement - it’s going to be tough to advise where to go here 😂

---

<div class="post-metadata">

**Author:** ![dbaker](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dbaker](https://community.postman.com/u/dbaker)\
**Post date:** [September 4, 2020, 12:27am UTC](https://community.postman.com/t/missing-attributes/15594/8 "2020-09-04T00:27:12Z")

</div>

Thanks for your help. I found that some of the data was being duplicated, as this is an issue on our side. Thank you again for your help.
