diff --git a/lib/services/core/serviceclient.js b/lib/services/core/serviceclient.js index 1209890e6..07e558487 100644 --- a/lib/services/core/serviceclient.js +++ b/lib/services/core/serviceclient.js @@ -514,6 +514,21 @@ ServiceClient.prototype._parseResponse = function (response) { var parsedBody; if (parser.resultObject) { parsedBody = parser.resultObject; + var keys = Object.keys(parsedBody); + if (keys[0] === '@') { + keys = keys.slice(1); + } + if (keys[keys.length - 1] === '@') { + keys.pop(); + } + if (keys.length === 1) { + var key = keys[0]; + var val = parsedBody[key]; + if (util.isArray(val)) { + // move it up + parsedBody = val; + } + } } else { parsedBody = { parsingError: parseError }; }