0

I'm new in javascript, i want to see all variables in my Object

I do this:

function configModal(data,buttonDatas){
...
alert(data.type);
...
}

but i have this:

[object Object]

Thx

Mercer
  • 9,488
  • 27
  • 98
  • 165

2 Answers2

1

Just use stringigy,

alert(JSON.stringify(data.type));

or display the object using console.log

console.log(data.type);
Rajaprabhu Aravindasamy
  • 64,912
  • 15
  • 96
  • 124
0

try something like this [Firefox => ctrl + shift + k]

 console.log(data.type)

Reference

https://developer.mozilla.org/en-US/docs/Tools/Web_Console

TRY firebug for firefox

https://getfirebug.com/wiki/index.php/Console_Panel

Google chrome

https://developer.chrome.com/devtools/docs/console

rajesh kakawat
  • 10,698
  • 1
  • 20
  • 39