Question: Trying to run a postman (pm) api call to run a request from the test tab.
Getting back streams in response (logged in console as array containing integers).

Any idea as to how to read these streams.

Request:

```
pm.sendRequest({
    url: myUrl,
    method: 'GET',
    header: {
        'content-type': 'application/json'
    }
}, function (err, res) {
    console.log(res)
});

```

Response:

```
Object:{}
    code:200
    cookie:[]
    header:[]
        0:{}
        1:{}
        2:{}
        3:{}
        4:{}
        5:{}
        6:{}
    id:"e5d5d6d6"
    responseSize:55551
    responseTime:263
    status:"OK"
    stream:{}
        data:[]
            0:123
            1:10
            2:32
            3:32
            4:34
            5:115
            6:119
            7:97
            8:103
            9:103
            10:101
            11:114
            12:34
            13:32
            14:58
            15:32
            16:34
            17:50
            18:46
            19:48
            20:34
            21:44
            22:10
            23:32
            24:32
            25:34

```

Answer: 
Just use:

`res.json()`

This gives the response body in json format.

Usage:

`pm.sendRequest('url', (err, res) => {console.log(res.json());}`
If response of below request is in XML format,

```
pm.sendRequest({
    url: myUrl,
    method: 'GET',
    header: {
        'content-type': 'application/json'
    }
}, function (err, res) {
    console.log(res)
});

```

I am trying to convert response using below code

```
var jsonObject = xml2Json(res);

```

It is giving error saying

> 
> JSONError | Unexpected token u in JSON at position 0
> 
> 
> 

When I used that same function with testscript, It is converting XML to hsonObject

```
var jsonObject = xml2Json(responseBody);

```