2

From the schema getting field name and response have value for that field name

{{ Response.{{ fieldname }} }} in angular

getting above error.

Narendar
  • 370
  • 9
  • 20

1 Answers1

2

Try {{ Response[fieldName] }} instead. The syntax for accessing a dynamic property is in Typescript is obj[prop] where prop is a string containing the property's key.

Here is a related question: Dynamically access object property using variable

vince
  • 7,182
  • 2
  • 30
  • 39
  • How to achieve this in typescript
    – Narendar Mar 15 '18 at 13:56
  • Sorry, I can't get enough context from your comment to understand the new question. Also, I don't have enough space or formatting tools to fully answer any new questions in the comments. I'd be happy to take a look if you open up a new question and share the link :) – vince Mar 15 '18 at 13:59
  • https://stackoverflow.com/questions/49303224/how-to-implement-for-loop-concept-for-schemanested – Narendar Mar 15 '18 at 15:21