Linked Questions
13 questions linked to/from Is there an equivalent for var_dump (PHP) in Javascript?
327 votes
9 answers
552k views
What is the JavaScript equivalent of var_dump or print_r in PHP? [duplicate]
I would like to see the structure of object in JavaScript (for debugging). Is there anything similar to var_dump in PHP?
0 votes
0 answers
69 views
Is there a function/method in JavaScript to get detailed information about the content of a variable? [duplicate]
I'm wondering if there is a function or method in JavaScript such as var_dump() in PHP that prints or returns detailed information about the content of a variable, i.e. value(s) and data type. ...
16 votes
3 answers
28k views
Does jQuery have a JSON/javascript object to HTML pretty print function similar to PHP's var_dump?
Does jQuery have a JSON/Javascript object to HTML pretty print function similar to PHP's var_dump? If yes, what is it?
9 votes
5 answers
8k views
JQuery quickly dump object's members
I was wondering if there was a quick way to get all of an object's variable's values, similar to php's var_dump() method. So if I had an object var myObject = { Up: 38, Dn: 40, Lf: 37, ...
3 votes
2 answers
14k views
How to display entire XML from JQuery's AJAX callback function?
I have this simple code to query against the web service:- $.get( url , function(xml) { var hello = $(xml).find("hello").text(); ... alert(xml); // displays [object ...
0 votes
4 answers
5k views
how to print the associative array in print_r() fashion from a $.getJSON call?
simple thing. $.getJSON is used and the result from the .php file being called is caught as response in the jquery callback function. The json encoded php array is an associative array. $.getJSON("...
2 votes
3 answers
580 views
jQuery getJSON basics
My first attempt at it, and the testing function does not seem to work: $.getJSON('questions.json', function(data) {alert(data);}) I am trying to alert all the contents of the JSON file which is ...
2 votes
1 answer
3k views
Unable to access style with getComputedStyle in iOS
Ok, so I have this function designed to return a desired computed style from a specified element. It works in all desktop browsers that I have tested, however, it does not work in mobile safari. If I ...
1 vote
1 answer
2k views
How to inspect/dump Ionic variables
I'm trying to inspect the $ionicTabsDelegate variable on my hybrid app using this "dump" solution which can be found here. function dump(obj) { var out = ''; for (var i in obj) { out +...
1 vote
3 answers
163 views
Learn about a javascript object
I have an [object Object] being passed as an argument through a jQuery function and I want to learn more about it. I don't want to know anything about this specific situation (unless there is no ...
1 vote
2 answers
1k views
How do we find the various properties of LocalStorage in HTML5
For counting the number of clicks in java script i see some sample code using localStorage.clickcount, this code works very well, but how can we learn about what are all the properties present in ...
1 vote
1 answer
72 views
Randarray not definied
I'm trying to create a two dimensional Array - but in the JS console it keeps saying my "Randarray" function isn't defined. I can't seem to figure out why it's undefined, maybe I just need another ...
0 votes
0 answers
63 views
How do I "print" from PhP in a cross-domain sort of way?
I'm developing a mobile application and am having trouble debugging my server-side code. I make cross-domain AJAX requests from the app. Normally, I would use var_dump() to display the contents of ...