dataliterate / data-populator

A plugin for Sketch and Adobe XD to populate your design mockups with meaningful data. Goodbye Lorem Ipsum. Hello JSON.
MIT License
1.67k stars 113 forks source link

Not recognising nested data #45

Closed alex-colbeck closed 8 years ago

alex-colbeck commented 8 years ago

For some reason it no longer allows me to use nested JSON.

For example:

"categories": [
  {
    "id": 8,
    "name": "News",
  }
],

It would normally allow me to just use {categories.name}

nitrada commented 8 years ago

@alex-colbeck this is how you address arrays properly: https://github.com/preciousforever/sketch-data-populator/releases/tag/v1.3.0

{categories.name} would work if you'd have nested objects, not an array within an object. am I right @rockitbaby?

does this solve it for you, @alex-colbeck?

rockitbaby commented 8 years ago

{categories[0].name} should work

alex-colbeck commented 8 years ago

Ace!!!

Thanks very much