I am creating multiple HTML elements. Elements have different properties.
I would like to get the property name, and the its value using index.
var elements = [
{"type":"div","className":"items","id":"item-0-"+item}
{"type":"div","className":"items","id":"item-0-"+item}
{"type":"input","type":"number","step":1,"min":1}
];
I want to access it like,
alert(elements[0][1]); //"className":"items"
alert(elements[0][1].value); //items
I tried that but It is not working.