Reading a JSONP array

Reading a JSONP array

Hello there. I have an ASP page witch generates me the following JSON:

  1. jQuery182022068346734158695_1349456086955({"pr_codigo":"P111528 ","cr_codigo":"210373","serie":"02","turma":"0101","ma_codigo":"06129","sigla":"ARTE E CUL"}{"pr_codigo":"P111528 ","cr_codigo":"218623","serie":"01","turma":"0101","ma_codigo":"05664","sigla":"DESENHO CO"});
And i have the following JavaScript function that will read those JSONS

  • $.ajax({
  • url: myJsonUrl,
  • dataType: 'jsonp',
  • success: function(data){
  •       alert("sucess");
  • },
  • error: function() {
  • alert("error");
  • }
  • });

  • Now, when this JSON has only 1 element such as {"elem" : "value"} it works nicely. However when i am returning multiple JSON objects as a json array ( {"elem" : "value"}{"elem" : "value2"} ) i get the following error:

    Uncaught SyntaxError: Unexpected token {

    The JSONP response is displayng correctly, however im not sure how can i do this.
    Thanks alot for any attention !