# How to fetch only code from object.objectId(BusinessPartner) from API (Json)?

**URL:** <https://community.postman.com/t/how-to-fetch-only-code-from-object-objectid-businesspartner-from-api-json/45972>\
**Category:** Help Hub\
**Tags:** json, apidesign, postman-api, jsonschema, json-response\
**Created:** [April 4, 2023, 9:01am UTC](https://community.postman.com/t/how-to-fetch-only-code-from-object-objectid-businesspartner-from-api-json/45972 "2023-04-04T09:01:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yashkdot](https://avatars.discourse-cdn.com/v4/letter/y/7ba0ec/32.png) [@yashkdot](https://community.postman.com/u/yashkdot)\
**Post date:** [April 4, 2023, 9:01am UTC](https://community.postman.com/t/how-to-fetch-only-code-from-object-objectid-businesspartner-from-api-json/45972/1 "2023-04-04T09:01:05Z")

</div>

Hi,all  
I want to fetch only one data inside object.objectId(BusinessPartner) like code instead of all data of object.objectId(BusinessPartner) ,likewise i am able to fetch two data value from Address, as I am testing an api and applied fields to filter city and country from address similar way i want to fetch only code from object.objectId(BusinessPartner) instead of other details , please help me out .  
For example :  
https://{cluster}.coresuite.com/api/data/v4/Address?expand=object.objectId(BusinessPartner)&fields=city,country&dtos=Address.17;BusinessPartner.17

{  
“data”: [  
{  
“address”: {  
“country”: “AU”,  
“city”: “Carlton”  
}  
},  
{  
“address”: {  
“country”: “AU”,  
“city”: “Southbank”  
},  
“object.objectId(BusinessPartner)”: {  
“country”: null,  
“code”: “C0003”,  
“city”: null,  
“shippingType”: null,  
“language”: “EN”,  
“owners”: null,

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/f/3/f399347420eccfcc1a959390ca15ed08431a8227.png)

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [April 4, 2023, 1:25pm UTC](https://community.postman.com/t/how-to-fetch-only-code-from-object-objectid-businesspartner-from-api-json/45972/2 "2023-04-04T13:25:46Z")

</div>

Your data element is an array, and object.objectId(BusinessPartner) is held in the second element in that array. The element name also has special characters.

You can target this using the following method.

```auto
const response = pm.response.json(); 
console.log(response.data[1]["object.objectId(BusinessPartner)"].code)

```
