Can’t read nested array json using JSRender
Code in this jsfiddle
I am getting
Error: Error: Cannot read property ‘person’ of undefined. Error: Cannot read property ‘person’ of undefined.
Anyone have an idea?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have a line in there:
Which is already inside the
personloop (so would be looking for alistobject inside yourpersonobject), and doesn’t match the layout of your data anyway, so it’s causing the error. Change that block to:and it works.