Iterate over objects

Iterate over objects if you need keys or values:

  • use .att to print the attribute

  • use .val to print the value

Data

  {
    myObject : {
      paul : '10',
      jack : '20',
      bob  : '30'
    }
  }
People name
People age

{d.myObject[i].att}

{d.myObject[i].val}

{d.myObject[i+1].att}

{d.myObject[i+1].val}

Last updated