【发布时间】:2016-09-13 15:09:49
【问题描述】:
如何将var apiMatch = '/api/Customer'的string变量匹配到来自API调用的JSON响应对象
JSON 对象如下图所示
我认为这样做很简单
if(data.paths == apiMatch ) {
// Do something here when its matched
console.log('its matched');
} else {
console.log('Nothing');
}
【问题讨论】: