how can i use the object value as object name
like this
$.each(columns, function(index, value) {
var objectName = value.object; // need to pass this
to the next $.each
//lets say i'm expecting objectName = x
$.each(values, function(i, v) {
// console.log(v.x) ; // this works fine
console.log(v.objectName);
});
});
i have tried toString() it didn’t work
Thanks
use square-bracket notation when using variables (identifiers) instead of actual object properties
For futher reference on subject : http://www.jibbering.com/faq/faq_notes/square_brackets.html