var myNewKeyNames = ['asas','asas'];
var obj =[{key:'value',key:'value'}]
for(var i =0; i<obj.length; i++) {
for(key in the obj[i]) {
alert(key) // gives the keys in the object
alert(myNewKeyNames) instead of key in the object which would rep the values
alert(value) // gives the value in the object
}
}
Now can i turn the key into some other values…. without using my loop’s key value. I tried to replace… like this… but its not taking…
I don’t want to rename the keys during the intial stage, just when the key is printed in the textboxxx at that time i want to name it different…
As I understood:
Check it!