Chrome Developer Console is console.log
ing this:
Your JSON sent is>> {yourVariable: "nothing yet"}
So i know the value "nothing yet"
in the {yourVariable: "nothing yet"}
JSON object is a string. But how do I know the type of the key yourVariable
?
Is there a way how to find that out using the Chrome console only?
All object keys are strings with quotes or without quotes. Try this way to see it. May be you are confused with console print because console print it without quotes and we usually write with quotes.
var jsonObj = {person:"me","age":"30", 123:"123"};
Object.keys(jsonObj).forEach(function(key){
console.log(typeof key)}
);