0

JSON it's pulling from:

unverifiedCompanies=[{"email":"testcompany@company.com","company_number":"09999999","company_name":"Name_123","full_name":"test","phone_number":"xyz"},{"email":"testtwo@company.com","company_number":"09999999","company_name":"Name_123","full_name":"test","phone_number":"xyz"}]

Iterating with

{{#each unverifiedCompanies}}
<tr>
  <td>{{this}}</td>
  <td>{{this.company_name}}</td>
  <td>{{this.full_name}}</td>
  <td>{{phone_number}}</td>
  <td>{{email}}</td>
</tr>
{{/each}}

However, only {{this}} displays {"email":"testcompany@company.com","company_number":"09999999","company_name":"Name_123","full_name":"test","phone_number":"xyz"} or {"email":"testtwo@company.com","company_number":"09999999","company_name":"Name_123","full_name":"test","phone_number":"xyz"} and all the others won't display.

Am I missing something?

Dominik Sandjaja
  • 6,326
  • 6
  • 52
  • 77
Rob
  • 88
  • 1
  • 14

1 Answers1

0

Wrap your content with braces {} in order to have it in JSON format. I guess the problem you have is that unverifiedCompanies is not resolved.

{unverifiedCompanies=[{"email":"testcompany@company.com","company_number":"09999999","company_name":"Name_123","full_name":"test","phone_number":"xyz"},{"email":"testtwo@company.com","company_number":"09999999","company_name":"Name_123","full_name":"test","phone_number":"xyz"}]}
Christophe
  • 2,131
  • 2
  • 21
  • 35