Parse Json Variable object

Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.

Here’s an outline with best practices for making your inquiry.

My question:

Hello, can anyone help me please i have to parse response body (json), but the problem that the object is a variable : 15556 is a variable
{
“15556”: {
“company”: “”,
“type”: “”
}
}

I’ve already tried:
var jsonData = pm.response.json();

console.log(jsonData.15556); and 

console.log(jsonData.“15556”);

@automationQA Welcome to the community :partying_face:

Please try to access using bracket notation.

console.log(jsonData[‘15556’]);

@bpricilla thanks it’s working :blush:

1 Like