Say you have a javascript object like this:
var data = { foo: \'bar\', baz: \'quux\' };
You can access the properties by the property name:
var obj = { a: [1, 3, 4], b: 2, c: ['hi', 'there'] } for(let r in obj){ //for in loop iterates all properties in an object console.log(r) ; //print all properties in sequence console.log(obj[r]);//print all properties values }