This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Vlad Mafteiu Scai
Posted Apr 24 - Read on Facebook

How exactly does one loop over a nested object in coffeescript?

for name, i in usernames
- I got this for a array with strings, but need something for nested objects as well.


Jordan Robert Dobson

So like this?

for key, value of myObject
print key, value

Jordan Robert Dobson

Do you have an array of objects?

Vlad Mafteiu Scai

So I am trying to achieve the following:

- Make a nr of cells using a loop that is equal to amount of users in the nested object called "people"
- Inside the class I got 2 textLayers. One should be updated based on the nested “name” array, the other based on the “city” array.

I spent several hours on this and can’t figure out how to write this. Most likely is some simple thing, but I would appreciate someone looking over and fixing it for me. :)

Read the entire post on Facebook