shapeshifter
shapeshifter

Reputation: 2967

Access array key with space

How can i access an array key with a space?

Standard way,

{{MyArray.name}}

Key with space,

{{MyArray.first name}}  or {{MyArray['first name']}}

doesn't work.

Upvotes: 10

Views: 5435

Answers (2)

Brad Urani
Brad Urani

Reputation: 1479

Use brackets in conjunction with dots, without quotes:

{{MyArray.[first name]}}

Upvotes: 13

Nate Barr
Nate Barr

Reputation: 4660

Here is the syntax:

{{[First Name]}}

Upvotes: 8

Related Questions