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,736
  • 30
  • 105
  • 170

2 Answers2

1

Just use stringigy,

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

or display the object using console.log

console.log(data.type);
Rajaprabhu Aravindasamy
  • 66,513
  • 17
  • 101
  • 130
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,826
  • 1
  • 21
  • 40