I want return an empty object meanwhile the object equals to boolean false in my function. Obviously,if I return {} like the code below,it equals to boolean true which cannot meet my request.
decodeAndParse: function (jsonStr) {
if (this.NaEptStr(jsonStr)) {
var result;
result = decodeURIComponent(jsonStr);
result = JSON.parse(result);
return result;
}
return false;
}
objectand make decisions on that likeif (this.NaEptStr(jsonStr)) { result.status=true; return result}else{return {status:false}}