# Accessing values within an array

**URL:** <https://community.postman.com/t/accessing-values-within-an-array/48442>\
**Category:** Help Hub\
**Created:** [June 12, 2023, 2:29pm UTC](https://community.postman.com/t/accessing-values-within-an-array/48442 "2023-06-12T14:29:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlos-eduardo-corre](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@carlos-eduardo-corre](https://community.postman.com/u/carlos-eduardo-corre)\
**Post date:** [June 12, 2023, 2:29pm UTC](https://community.postman.com/t/accessing-values-within-an-array/48442/1 "2023-06-12T14:29:22Z")

</div>

I have a request that gets the following body in the response:

[  
{  
“Request”: {  
“id”: 281,  
“snaplogicrequestid”: “onemd4cjobidojsubwhoym”,  
“overallstatus”: “finished incomplete”,  
“statussent”: true,  
“completed”: true,  
“updatedfrom”: “/SIE\_DI\_TEST/ACAP/Generator\_Results/03\_Generate\_Task\_Results”,  
“jobid”: “onemd4cjobidojsubwhoym”,  
“payload”: “{"metadata":{"topic":"AssetCollector\_Task\_In","partition":3,"offset":96,"consumer\_group":"acap\_qa\_cg1","client\_id":"1686552294401|ip-10-138-159-70.eu-central-1.compute.internal|/SIE\_DI\_TEST/ACAP/OneMD4C\_Tasks/01\_OneMD4C\_Tasks/OneMD Tasks Consumer|6007d3c7c5702041dcf5166c\_a477d5a1-dc27-4b52-8323-245c3a72e008|d1f8face-cc19-4d74-b2a4-fee8e2d73fa2","tracker\_index":0,"batch\_size":1,"batch\_index":0,"record\_index":0,"auto\_commit":false},"timeNow":"2023-06-12T08:47:08.379Z","snaplogicrequestid":"onemd4cjobidojsubwhoym","Task":{"articleNumberlistRef":"sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv","configurationName":"Catalogue Download Oct 22","customerID":"cust123456","jobID":"onemd4cjobidojsubwhoym","language":"en-EN","region":"DE","request":[{"pictures":{"productphoto":{"format":[1,9,16,19,49,59,63,64,68],"url":"false"},"dimensiondrawing":{"format":[9,5,19,16,59,45,63,44],"url":"true"},"model3D":{"format":[9,51,19,16,73,11],"url":"true"},"caeeplanMakro":{"format":[69],"url":"true"},"caeConnDiagram":{"format":[51],"url":"true"},"unitwiringdiagramIEC":{"format":[19,5,16,9,59,45,44],"url":"true"},"unitwiringdiagramANSI":{"format":[19,5,16,9,59,44],"url":"true"},"diagram2D":{"format":[19,5,16,9,59,44],"url":"true"}}}]}}”,  
**“resultpayload”: “{"jobId":"onemd4cjobidojsubwhoym","status":"finished incomplete","statuscode":41,"statusmessage":"Package available, with the available assets (less than requested amount)","progress":100,"ResultURL":"sftp://acapns.upload.akamai.com/1389923/provisioning\_oneMD4C/onemd4cjobidojsubwhoym.zip","LogURL":"sftp://acapns.upload.akamai.com/1389923/provisioning\_oneMD4C/onemd4cjobidojsubwhoym.zip","Request":[{"pictures":{"status":"finished incomplete",_"statuscode":41,_"statusmessage":"63 products exported out of 308","errorcode":""}}]}”,**  
“articlenumberlistref”: “sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv”,  
“resulturl”: “sftp://acapns.upload.akamai.com/1389923/provisioning\_oneMD4C/onemd4cjobidojsubwhoym.zip”,  
“customerid”: “cust123456”,  
“language”: “en-EN”,  
“generators”: 1,  
“lastmodified”: “2023-06-12T08:50:37.190”,  
“requestreceivedtimestamp”: “2023-06-12T08:47:08.379”,  
“requestcompletetimestamp”: “2023-06-12T08:50:37.190”,  
“statussenttimestamp”: “2023-06-12T08:50:37.190”,  
“sendattemptcount”: 0  
}  
},  
{  
“Generator”: {  
“id”: 323,  
“snaplogicrequestid”: “onemd4cjobidojsubwhoym”,  
“generator”: “BILDDB”,  
“updatedfrom”: “/SIE\_DI\_TEST/ACAP/Generator\_Results/02\_Process\_Record”,  
“totalproducts”: 308,  
“status”: “finished incomplete”,  
“statuscode”: 41,  
“statusmessage”: “pictures have been partially exported”,  
“errorcode”: “”,  
“exportedproducts”: 63,  
“resulturl”: “sftp://acapns.upload.akamai.com/1389923/delivery\_Pictures/onemd4cjobidojsubwhoym.zip”,  
“logurl”: “sftp://acapns.upload.akamai.com/1389923/delivery\_Pictures/onemd4cjobidojsubwhoym.zip”,  
“lastmodified”: “2023-06-12T08:50:23.044”,  
“progress”: 100  
}  
},  
{  
“GeneratorLog”: {  
“snaplogicrequestid”: “onemd4cjobidojsubwhoym”,  
“logtype”: “BIDDB Generator Status Update”,  
“generator”: “BILDDB”,  
“updatedfrom”: “/SIE\_DI\_TEST/ACAP/BILDDB\_Subtasks/02\_Process\_Message”,  
“lastmodified”: “2023-06-12T08:49:35.242”,  
“success”: true,  
“responsestatus”: null,  
“responseidentifier”: “”,  
“message”: “request sent to generator”,  
“requestpayload”: “{"jobId":"onemd4cjobidojsubwhoym#BILDDB","status":"received","exportedproducts":0,"statuscode":20,"statusmessage":"request sent to generator","errorcode":"","progress":20,"ResultURL":"","LogURL":""}”,  
“responsepayload”: null,  
“argsmetadata”: “{"SnaplogicRequestId":"onemd4cjobidojsubwhoym","MLFBFilePath":"sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv"}”  
}  
},  
{  
“GeneratorLog”: {  
“snaplogicrequestid”: “onemd4cjobidojsubwhoym”,  
“logtype”: “BIDDB Generator Status Update”,  
“generator”: “BILDDB”,  
“updatedfrom”: “/SIE\_DI\_TEST/ACAP/BILDDB\_Subtasks/02\_Process\_Message”,  
“lastmodified”: “2023-06-12T08:49:35.243”,  
“success”: true,  
“responsestatus”: null,  
“responseidentifier”: “”,  
“message”: “job accepted”,  
“requestpayload”: “{"jobId":"onemd4cjobidojsubwhoym#BILDDB","status":"in progress","exportedproducts":0,"statuscode":30,"statusmessage":"job accepted","errorcode":"","progress":30,"ResultURL":"","LogURL":""}”,  
“responsepayload”: null,  
“argsmetadata”: “{"SnaplogicRequestId":"onemd4cjobidojsubwhoym","MLFBFilePath":"sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv"}”  
}  
},  
{  
“GeneratorLog”: {  
“snaplogicrequestid”: “onemd4cjobidojsubwhoym”,  
“logtype”: “BIDDB Generator Status Update”,  
“generator”: “BILDDB”,  
“updatedfrom”: “/SIE\_DI\_TEST/ACAP/BILDDB\_Subtasks/02\_Process\_Message”,  
“lastmodified”: “2023-06-12T08:49:35.243”,  
“success”: true,  
“responsestatus”: null,  
“responseidentifier”: “”,  
“message”: “job in work”,  
“requestpayload”: “{"jobId":"onemd4cjobidojsubwhoym#BILDDB","status":"in progress","exportedproducts":0,"statuscode":30,"statusmessage":"job in work","errorcode":"","progress":30,"ResultURL":"","LogURL":""}”,  
“responsepayload”: null,  
“argsmetadata”: “{"SnaplogicRequestId":"onemd4cjobidojsubwhoym","MLFBFilePath":"sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv"}”  
}  
},  
{  
“GeneratorLog”: {  
“snaplogicrequestid”: “onemd4cjobidojsubwhoym”,  
“logtype”: “BIDDB Generator Status Update”,  
“generator”: “BILDDB”,  
“updatedfrom”: “/SIE\_DI\_TEST/ACAP/BILDDB\_Subtasks/02\_Process\_Message”,  
“lastmodified”: “2023-06-12T08:49:35.243”,  
“success”: true,  
“responsestatus”: null,  
“responseidentifier”: “”,  
“message”: “pictures have been partially exported”,  
“requestpayload”: “{"jobId":"onemd4cjobidojsubwhoym#BILDDB","status":"finished incomplete","exportedproducts":63,"statuscode":41,"statusmessage":"pictures have been partially exported","errorcode":"","progress":100,"ResultURL":"sftp://acapns.upload.akamai.com/1389923/delivery\_Pictures/onemd4cjobidojsubwhoym.zip","LogURL":"sftp://acapns.upload.akamai.com/1389923/delivery\_Pictures/onemd4cjobidojsubwhoym.zip"}”,  
“responsepayload”: null,  
“argsmetadata”: “{"SnaplogicRequestId":"onemd4cjobidojsubwhoym","MLFBFilePath":"sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv"}”  
}  
}  
]

My goal is to log on the console the different values within the bold text, specifically the italic “status code” value.

I can access the entire resultpayload with:

**var jsonData = pm.response.json();**  
**console.log(jsonData[0].Request.resultpayload);**

But I am having trouble getting the properties inside it.

I tried **console.log(jsonData[0].Request.resultpayload[2]);**  
But that gives me “j” (the 3rd character) instead of the statuscode property I’m looking for.

I also tried **console.log(jsonData[0].Request.resultpayload.statuscode);**  
But that gives undefined error.

Thank you in advance for any help.

---

<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:** [June 12, 2023, 3:29pm UTC](https://community.postman.com/t/accessing-values-within-an-array/48442/2 "2023-06-12T15:29:46Z")

</div>

Can you repost your JSON sample using the preformatted text option in the editor.

This will stop everything from being aligned to the left at which point we can help with the targeting of the elements.

---

<div class="post-metadata">

**Author:** ![carlos-eduardo-corre](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@carlos-eduardo-corre](https://community.postman.com/u/carlos-eduardo-corre)\
**Post date:** [June 12, 2023, 3:33pm UTC](https://community.postman.com/t/accessing-values-within-an-array/48442/3 "2023-06-12T15:33:27Z")

</div>

```auto
[
    {
        "Request": {
            "id": 281,
            "snaplogicrequestid": "onemd4cjobidojsubwhoym",
            "overallstatus": "finished incomplete",
            "statussent": true,
            "completed": true,
            "updatedfrom": "/SIE_DI_TEST/ACAP/Generator_Results/03_Generate_Task_Results",
            "runtimeurl": "https://cdn.elastic.snaplogic.com/sl/designer.html#pipe_runtime_id=6007d3c7c5702041dcf5166c_d56e39ef-80af-4a9e-8bc9-7390efdb0b95",
            "jobid": "onemd4cjobidojsubwhoym",
            "payload": "{\"metadata\":{\"topic\":\"AssetCollector_Task_In\",\"partition\":3,\"offset\":96,\"consumer_group\":\"acap_qa_cg1\",\"client_id\":\"1686552294401|ip-10-138-159-70.eu-central-1.compute.internal|/SIE_DI_TEST/ACAP/OneMD4C_Tasks/01_OneMD4C_Tasks/OneMD Tasks Consumer|6007d3c7c5702041dcf5166c_a477d5a1-dc27-4b52-8323-245c3a72e008|d1f8face-cc19-4d74-b2a4-fee8e2d73fa2\",\"tracker_index\":0,\"batch_size\":1,\"batch_index\":0,\"record_index\":0,\"auto_commit\":false},\"timeNow\":\"2023-06-12T08:47:08.379Z\",\"snaplogicrequestid\":\"onemd4cjobidojsubwhoym\",\"Task\":{\"articleNumberlistRef\":\"sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv\",\"configurationName\":\"Catalogue Download Oct 22\",\"customerID\":\"cust123456\",\"jobID\":\"onemd4cjobidojsubwhoym\",\"language\":\"en-EN\",\"region\":\"DE\",\"request\":[{\"pictures\":{\"productphoto\":{\"format\":[1,9,16,19,49,59,63,64,68],\"url\":\"false\"},\"dimensiondrawing\":{\"format\":[9,5,19,16,59,45,63,44],\"url\":\"true\"},\"model3D\":{\"format\":[9,51,19,16,73,11],\"url\":\"true\"},\"caeeplanMakro\":{\"format\":[69],\"url\":\"true\"},\"caeConnDiagram\":{\"format\":[51],\"url\":\"true\"},\"unitwiringdiagramIEC\":{\"format\":[19,5,16,9,59,45,44],\"url\":\"true\"},\"unitwiringdiagramANSI\":{\"format\":[19,5,16,9,59,44],\"url\":\"true\"},\"diagram2D\":{\"format\":[19,5,16,9,59,44],\"url\":\"true\"}}}]}}",
            "resultpayload": "{\"jobId\":\"onemd4cjobidojsubwhoym\",\"status\":\"finished incomplete\",\"statuscode\":41,\"statusmessage\":\"Package available, with the available assets (less than requested amount)\",\"progress\":100,\"ResultURL\":\"sftp://acapns.upload.akamai.com/1389923/provisioning_oneMD4C/onemd4cjobidojsubwhoym.zip\",\"LogURL\":\"sftp://acapns.upload.akamai.com/1389923/provisioning_oneMD4C/onemd4cjobidojsubwhoym.zip\",\"Request\":[{\"pictures\":{\"status\":\"finished incomplete\",\"statuscode\":41,\"statusmessage\":\"63 products exported out of 308\",\"errorcode\":\"\"}}]}",
            "articlenumberlistref": "sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv",
            "resulturl": "sftp://acapns.upload.akamai.com/1389923/provisioning_oneMD4C/onemd4cjobidojsubwhoym.zip",
            "customerid": "cust123456",
            "language": "en-EN",
            "generators": 1,
            "lastmodified": "2023-06-12T08:50:37.190",
            "requestreceivedtimestamp": "2023-06-12T08:47:08.379",
            "requestcompletetimestamp": "2023-06-12T08:50:37.190",
            "statussenttimestamp": "2023-06-12T08:50:37.190",
            "sendattemptcount": 0
        }
    },
    {
        "Generator": {
            "id": 323,
            "snaplogicrequestid": "onemd4cjobidojsubwhoym",
            "generator": "BILDDB",
            "updatedfrom": "/SIE_DI_TEST/ACAP/Generator_Results/02_Process_Record",
            "runtimeurl": "https://cdn.elastic.snaplogic.com/sl/designer.html#pipe_runtime_id=6007d3c7c5702041dcf5166c_94d9478d-0773-4e1a-84c8-b63ef97da8dc",
            "totalproducts": 308,
            "status": "finished incomplete",
            "statuscode": 41,
            "statusmessage": "pictures have been partially exported",
            "errorcode": "",
            "exportedproducts": 63,
            "resulturl": "sftp://acapns.upload.akamai.com/1389923/delivery_Pictures/onemd4cjobidojsubwhoym.zip",
            "logurl": "sftp://acapns.upload.akamai.com/1389923/delivery_Pictures/onemd4cjobidojsubwhoym.zip",
            "lastmodified": "2023-06-12T08:50:23.044",
            "progress": 100
        }
    },
    {
        "GeneratorLog": {
            "snaplogicrequestid": "onemd4cjobidojsubwhoym",
            "logtype": "BIDDB Generator Status Update",
            "generator": "BILDDB",
            "updatedfrom": "/SIE_DI_TEST/ACAP/BILDDB_Subtasks/02_Process_Message",
            "lastmodified": "2023-06-12T08:49:35.242",
            "success": true,
            "responsestatus": null,
            "responseidentifier": "",
            "message": "request sent to generator",
            "requestpayload": "{\"jobId\":\"onemd4cjobidojsubwhoym#BILDDB\",\"status\":\"received\",\"exportedproducts\":0,\"statuscode\":20,\"statusmessage\":\"request sent to generator\",\"errorcode\":\"\",\"progress\":20,\"ResultURL\":\"\",\"LogURL\":\"\"}",
            "responsepayload": null,
            "runtimeurl": "https://cdn.elastic.snaplogic.com/sl/designer.html#pipe_runtime_id=6007d3c7c5702041dcf5166c_817d7616-5950-4159-bfa0-9854d0609f3e",
            "parentruntimeurl": "https://cdn.elastic.snaplogic.com/sl/designer.html#pipe_runtime_id=6007d3c7c5702041dcf5166c_a4106353-4f2f-4136-a4be-8ccb4b90ef89",
            "argsmetadata": "{\"SnaplogicRequestId\":\"onemd4cjobidojsubwhoym\",\"MLFBFilePath\":\"sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv\"}"
        }
    },
    {
        "GeneratorLog": {
            "snaplogicrequestid": "onemd4cjobidojsubwhoym",
            "logtype": "BIDDB Generator Status Update",
            "generator": "BILDDB",
            "updatedfrom": "/SIE_DI_TEST/ACAP/BILDDB_Subtasks/02_Process_Message",
            "lastmodified": "2023-06-12T08:49:35.243",
            "success": true,
            "responsestatus": null,
            "responseidentifier": "",
            "message": "job accepted",
            "requestpayload": "{\"jobId\":\"onemd4cjobidojsubwhoym#BILDDB\",\"status\":\"in progress\",\"exportedproducts\":0,\"statuscode\":30,\"statusmessage\":\"job accepted\",\"errorcode\":\"\",\"progress\":30,\"ResultURL\":\"\",\"LogURL\":\"\"}",
            "responsepayload": null,
            "runtimeurl": "https://cdn.elastic.snaplogic.com/sl/designer.html#pipe_runtime_id=6007d3c7c5702041dcf5166c_817d7616-5950-4159-bfa0-9854d0609f3e",
            "parentruntimeurl": "https://cdn.elastic.snaplogic.com/sl/designer.html#pipe_runtime_id=6007d3c7c5702041dcf5166c_a4106353-4f2f-4136-a4be-8ccb4b90ef89",
            "argsmetadata": "{\"SnaplogicRequestId\":\"onemd4cjobidojsubwhoym\",\"MLFBFilePath\":\"sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv\"}"
        }
    },
    {
        "GeneratorLog": {
            "snaplogicrequestid": "onemd4cjobidojsubwhoym",
            "logtype": "BIDDB Generator Status Update",
            "generator": "BILDDB",
            "updatedfrom": "/SIE_DI_TEST/ACAP/BILDDB_Subtasks/02_Process_Message",
            "lastmodified": "2023-06-12T08:49:35.243",
            "success": true,
            "responsestatus": null,
            "responseidentifier": "",
            "message": "job in work",
            "requestpayload": "{\"jobId\":\"onemd4cjobidojsubwhoym#BILDDB\",\"status\":\"in progress\",\"exportedproducts\":0,\"statuscode\":30,\"statusmessage\":\"job in work\",\"errorcode\":\"\",\"progress\":30,\"ResultURL\":\"\",\"LogURL\":\"\"}",
            "responsepayload": null,
            "runtimeurl": "https://cdn.elastic.snaplogic.com/sl/designer.html#pipe_runtime_id=6007d3c7c5702041dcf5166c_817d7616-5950-4159-bfa0-9854d0609f3e",
            "parentruntimeurl": "https://cdn.elastic.snaplogic.com/sl/designer.html#pipe_runtime_id=6007d3c7c5702041dcf5166c_a4106353-4f2f-4136-a4be-8ccb4b90ef89",
            "argsmetadata": "{\"SnaplogicRequestId\":\"onemd4cjobidojsubwhoym\",\"MLFBFilePath\":\"sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv\"}"
        }
    },
    {
        "GeneratorLog": {
            "snaplogicrequestid": "onemd4cjobidojsubwhoym",
            "logtype": "BIDDB Generator Status Update",
            "generator": "BILDDB",
            "updatedfrom": "/SIE_DI_TEST/ACAP/BILDDB_Subtasks/02_Process_Message",
            "lastmodified": "2023-06-12T08:49:35.243",
            "success": true,
            "responsestatus": null,
            "responseidentifier": "",
            "message": "pictures have been partially exported",
            "requestpayload": "{\"jobId\":\"onemd4cjobidojsubwhoym#BILDDB\",\"status\":\"finished incomplete\",\"exportedproducts\":63,\"statuscode\":41,\"statusmessage\":\"pictures have been partially exported\",\"errorcode\":\"\",\"progress\":100,\"ResultURL\":\"sftp://acapns.upload.akamai.com/1389923/delivery_Pictures/onemd4cjobidojsubwhoym.zip\",\"LogURL\":\"sftp://acapns.upload.akamai.com/1389923/delivery_Pictures/onemd4cjobidojsubwhoym.zip\"}",
            "responsepayload": null,
            "runtimeurl": "https://cdn.elastic.snaplogic.com/sl/designer.html#pipe_runtime_id=6007d3c7c5702041dcf5166c_817d7616-5950-4159-bfa0-9854d0609f3e",
            "parentruntimeurl": "https://cdn.elastic.snaplogic.com/sl/designer.html#pipe_runtime_id=6007d3c7c5702041dcf5166c_a4106353-4f2f-4136-a4be-8ccb4b90ef89",
            "argsmetadata": "{\"SnaplogicRequestId\":\"onemd4cjobidojsubwhoym\",\"MLFBFilePath\":\"sftp://acapns.upload.akamai.com/1389923/articlenumberlist-test1.csv\"}"
        }
    }
]

```

---

<div class="post-metadata">

**Author:** ![carlos-eduardo-corre](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@carlos-eduardo-corre](https://community.postman.com/u/carlos-eduardo-corre)\
**Post date:** [June 12, 2023, 3:36pm UTC](https://community.postman.com/t/accessing-values-within-an-array/48442/4 "2023-06-12T15:36:39Z")

</div>

In the meantime I found out it is not an array but an object (I believe).

I also tried

```auto
console.log("Status code: " + jsonData[0].Request.resultpayload.property("statuscode"));

```

but got an error  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/4/4/44a21c4cdfa8a684dc12255b4de8beac9607a1f1.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:** [June 12, 2023, 3:49pm UTC](https://community.postman.com/t/accessing-values-within-an-array/48442/5 "2023-06-12T15:49:26Z")

</div>

The problem is that resultpayload is an object in a string, therefore you need to parse this before you can work with it.

```auto
const response = pm.response.json();

console.log(response);

let resultpayload = JSON.parse(response[0].Request.resultpayload);

console.log(resultpayload);

console.log(resultpayload.statuscode);

```

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

---

<div class="post-metadata">

**Author:** ![carlos-eduardo-corre](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@carlos-eduardo-corre](https://community.postman.com/u/carlos-eduardo-corre)\
**Post date:** [June 12, 2023, 4:15pm UTC](https://community.postman.com/t/accessing-values-within-an-array/48442/6 "2023-06-12T16:15:13Z")

</div>

This worked. Thank you very much for the help 😀

---

<div class="post-metadata">

**Author:** ![carlos-eduardo-corre](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@carlos-eduardo-corre](https://community.postman.com/u/carlos-eduardo-corre)\
**Post date:** [June 14, 2023, 2:27pm UTC](https://community.postman.com/t/accessing-values-within-an-array/48442/7 "2023-06-14T14:27:06Z")

</div>

Hello. I have a follow-up question if you don’t mind.

I am now trying to log the properties within the Request object which is inside the resultpayload object.

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

I have tried both:

`console.info(resultpayload.Request.statusmessage);`  
which gives undefined

and following the same logic as you showed:

```auto
let resultpayload2 =JSON.parse(resultpayload.Request);
console.info(resultpayload2.statusmessage);

```

which also gives an error.

I also tried a more simple approach with:

```auto
console.info("Trying this" + resultpayload.Request);

```

but it returns  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/3/e/3e8cec5178bfebc6707ddbad28a9c4829c24f789.png)

Thank you once again for your help

---

<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:** [June 14, 2023, 3:09pm UTC](https://community.postman.com/t/accessing-values-within-an-array/48442/8 "2023-06-14T15:09:05Z")

</div>

The Request key is an array, so you need to target it with its index. (Array indexes start at 0)

![image](https://us1.discourse-cdn.com/getpostman/original/3X/4/2/428c37e34304006d10dd04f3519325b0586fe444.png)

```auto
let resultpayload = JSON.parse(response[0].Request.resultpayload);
console.log(resultpayload);
console.log(resultpayload.statuscode);
console.log(resultpayload.Request[0].pictures.statusmessage) // 63 products exported out of 308

```

---

<div class="post-metadata">

**Author:** ![carlos-eduardo-corre](https://avatars.discourse-cdn.com/v4/letter/c/97f17d/32.png) [@carlos-eduardo-corre](https://community.postman.com/u/carlos-eduardo-corre)\
**Post date:** [June 14, 2023, 3:31pm UTC](https://community.postman.com/t/accessing-values-within-an-array/48442/9 "2023-06-14T15:31:42Z")

</div>

So it was more straightforward than what I thought, I’ve now learnt that after parsing it once the properties can be accessed normally.

Thank you so much for your help once again 😀
