'Parse Error' on returning value from my umbraco web api using JsonP
I am using Umbraco 6.1.6 with MVC4 on Visual Studio 2012.
I am using jsonp to return value from my umbraco web api. But the response on network tab of inspect element shows the response. But still I get parse error on client side.
Server-side code
public class LocaterApiController : UmbracoApiController
{
private proUmbracoContext db = new proUmbracoContext();
[HttpGet]
public IEnumerable<string> GetNearest()
{
return new[] { "Table", "Chair", "Desk", "Computer", "Beer fridge" };
}
}
'Parse Error' on returning value from my umbraco web api using JsonP
I am using Umbraco 6.1.6 with MVC4 on Visual Studio 2012.
I am using jsonp to return value from my umbraco web api. But the response on network tab of inspect element shows the response. But still I get parse error on client side.
Server-side code
client-side Code
I am returning values from server to client and on the network tab the status is shown '200 OK' and the response is
["Table","Chair","Desk","Computer","Beer fridge"]
But it alerts a parse error.
Hope some could point what I am doing Wrong.
Any Help Would be Appreciated.
is working on a reply...