How can I loop through all members in a JavaScript object including values that are objects.
(如何遍历JavaScript对象中的所有成员,包括对象值。)
For example, how could I loop through this (accessing the "your_name" and "your_message" for each)?
(例如,如何循环浏览(分别访问“ your_name”和“ your_message”)?)
var validation_messages = {
"key_1": {
"your_name": "jimmy",
"your_msg": "hello world"
},
"key_2": {
"your_name": "billy",
"your_msg": "foo equals bar"
}
}
ask by edt translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…