0

Trying to output data from an API:

{{forecast.list.rain.3h}}

Gives an error: Syntax Error: Token '.3' is an unexpected token at column 19 of the expression [forecast.list.rain.3h] starting at [.3h]. saying that .3 is the error, integers not allowed in {{....}}? This seems problematic when the data is stored like this:

rain:Object
3h:0.005

1 Answer 1

2

Well you can't reference this property with dot-notation since a valid identifier may not start with a number. Use {{forecast.list.rain['3h']}} instead.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.