Postman Visualizer @key

Hello, I have this data as response in Postman:

data: {
                child": {
                    "child2": {
                        "child3": {
                            "B07C5": {
                                "name": value}, 
                            "B01Z3": {
                                "name": value}, ....}}}}

I would likt to visualize the value.
However I’m unable to do this, since I have the dynamic id (e.g. B07CF) as “headline”.

I tried this:

{{#each response.data}}
            <tr>
                <td>{{[email protected]}}</td>
            </tr>
        {{/each}}

Unfortunately this doesn’t work.
I tried also @this and @value, but this doesn’t work either.

Can somebody help me here please?

Hello @Florian.H , I don’t think you need to pass the dynamic key here.


{
    "data": {
        "child": {
            "child2": {
                "child3": {
                    "B07C5": {
                        "name": "value-123"
                    },
                    "B01Z3": {
                        "name": "value-5345"
                    }
                }
            }
        }
    }
}

you can use below code.

var resp = pm.response.json()

var template = `
    <table bgcolor="#FFFFFF">
        <tr>
            <th>DataName</th>
        </tr>

        {{#each response}}
            <tr>
                <td>{{name}}</td>
            </tr>
        {{/each}}
    </table>
`;

// Set visualizer
pm.visualizer.set(template, {
    response: resp.data.child.child2.child3
});

Cheers :cake: