Printing values to the Test Results and Console

I have searched in this forum and googled but no joy. I have a large data set and retrieving the values would be immensely helpful.

All I’m trying to do is to print out the following 3 values in the

  1. Postman Test Results
  2. Postman Console

{
“array”: [
{
“id”: “11111”,
“title”: “Title1”,
“name”: “title1”,
…lots of other values that I don’t necessarily have to capture
},
{
“id”: “22222”,
“title”: “Title2”,
“name”: “title2”,
…lots of other values that I don’t necessarily have to capture
},
{
“id”: “33333”,
“title”: “Title3”,
“name”: “title3”,
…lots of other values that I don’t necessarily have to capture

You can loop through the array and print whichever properties you want to the console.

const jsonData = pm.response.json()
for (const props of jsonData.array) {
console.log(props.id, props.title, props.name)
}