The script below return a JSON from my ODataController
< script >
$(document).ready(function() {
$.ajax({
url: "http://localhost:37994/odata/EPStructures3/",
type: "Get",
contentType: 'application/json; charset=utf-8',
success: function(data)
{
//do something.....
},
error: function(msg)
{
alert(msg);
}
});
});
< /script>
The JSON :
{ "odata.metadata":"http://localhost:37994/odata/$metadata#EPStructures3","value":[{"eps_level":0,"id":2},{"eps_level":1,"id":3}]}
I want to exclude the metadata and type so the JSON is returned like this:
[{"eps_level":0,"id":2},{"eps_level":1,"id":3}]
How can I achieve this?