Am new to Postman. This has me stumped.
JSON:
…
{
"Jewels": [
{
"GemKey": "2020042gg",
"Brand": "Jed Hodge",
"Prices": [
{
"Key": "202004240500",
"Code": "T3",
"Type": "Fin",
"Price": 200,
}
],
"Name": "Round Gem",
TEST TAB:
…
var template = `
<html lang="en">
{{#each response.Jewels}}
<div class="card border-info mb-3" style="width: 280px; margin: 0 10 10 0; float: left">
<div class="card-header">Price: ?{{Price}}</div>
<div class="card-body">
<h5 class="card-title">{{Brand}}</h5>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
{{/each}}
</html>
`;
pm.visualizer.set(template, {response: pm.response.json()});
VISUALIZER PROBLEM
…
I can get {{Brand}}
and the visualizer displays just fine but can’t get Price.
Things that didn’t work:
{{Prices.Price}}
, using {{#with Prices}
}, removing the () in my visualizer.set.
How do I get Price?