Hello friends please how can i know if the className name contains a property since i'm using Ajax and i receive my class name as data.className
This is my code :
$.post(action, object, function(data){
if(data.className.prototype.hasOwnProperty(data.methodName))
console.log("the property exists")
return data;
}, 'json');
My object :
{"className":"Quote", "methodName":"deleteQuote"}
This is my class Quote
class Quote{
deleteQuote(callback){
console.log("hello world");
}
}
Thank you