How to use if else condition in postman visualizer

Hi All,

Actually i want to write if else condition in my table data tag
the condition is such that if key value is null or document don’t have key
in the table it should show null.

Here testOne and test are column in my documents
My code in test
var template = `

<table bgcolor="white">
    <tr>
        <th>Title</th>
        <th>Year</th>
        <th>IMDB Rating</th>
        <th>Awards Wins<th>
        <th>test<th>
        <th>testOne<th>
    </tr>

    {{#each response}}
        <tr>
            <td>{{title}}</td>
            <td>{{year}}</td>
            <td>{{imdb.rating}}</td>
            <td>{{awards.wins}}</td>
            <td>{{test}}<td>
            if ({{testOne}}) {
                return (
                <td>{{testOne}}</td>
                ) 
            } else {
                return (
                <td>null</td>
                )
            }    
        </tr>
    {{/each}}
</table>

`;

// Set visualizer
pm.visualizer.set(template, {
// Pass the response body parsed as JSON as data
response: pm.response.json().documents
});