I'm using $resource
to get a JSON object. Now it returned an object with number keys which was expected to be a JSON.
My code:
$resource('url', {
'param': 1
}
});
var data = Session.get(function(e) {});
m {0: "[", 1: "{", 2: "s", 3: "h", 4: "o", 5: "p", 6: "I", 7: "d"
Hope to be a string like this:
'[{"shopId":"1","shopName":"name"}]'
It's worked well with jQuery.
jQuery code:
$.ajax({
url: requestUrl,
type: 'GET',
dataType: 'json',
data: {
'param': 7
}
})