Get JSON key name [duplicate]

So now the problem I am facing is that, what about if I want to alert
success. Is there a need way to get it ?

If your object is

var obj = {"success":"You are welcome"};

You can get the array of keys as

var keys = Object.keys(obj);

and then print it as

console.log( keys[ 0 ] ); //or console.log( keys.join(",") )

var obj = {"success":"You are welcome"};
var keys = Object.keys(obj);
console.log(keys[0]);

Leave a Comment

404 Not Found

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.