Rails: View javascript object's attributes in browser's console
I have created a variable in CoffeeScript and can verify that it logs as
'object' in the browser's console:
# app/assets/javascripts/products.js.coffee
myvar =
name: "Test"
valid: false
jQuery ->
console.log(myvar)
console output:
Object
name: "Test"
valid: false
__proto__: Object
So browser knows about the object but how can I manually dump it's values
from the console (>) prompt. I'm using Safari at the moment but can switch
if it's not possible w/Safari.
No comments:
Post a Comment