0

プル元の JSON:

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"}]

繰り返し

{{#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}}

ただし、{{this}}表示のみ、{"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"}他のすべては表示されません。

何か不足していますか?

4

1 に答える 1

0

JSON 形式にするために、コンテンツを中かっこ {} で囲みます。あなたが抱えている問題は、 unverifiedCompanies が解決されていないことだと思います。

{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"}]}
于 2016-09-26T09:14:03.610 に答える