angularjs - How can I loop through values in my json file? -


Assume that I have a json file and I would like to loop through values ​​like this:

"", "Date": "2014-10-28", "Zodiac": 1111, "Product ID": "2", "Details": "Cash" }; (Value in myModel) {// element (by.model (key)) clear (). SendKeys (value); }

This is a part of a jasmine script , but this is not the point Question is how do I write per key through my model ie Can I 'id', 'date' etc. and their values ​​in angular JS?

I think you need it:

 for  (Key in myModel) {console.log ("key:", key) console .log ("value: myModel [key]}}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -