I have a file abcjsn.json in remote url like: http://abc.com/abcjsn.json The content of the Json file is :
{
"root": {
"node": [
{
"@attributes": {
"id": "6",
"name": "Europe",
"description": "European Curricula"
},
"node": {
"@attributes": {
"id": "2553",
"name": "Ireland",
"description": "Irish Curricula"
},
"node": {
"@attributes": {
"id": "3083",
"name": "Primary School Curriculum",
"description": "Primary Curriculum"
}
}
}
},
{
"@attributes": {
"id": "7",
"name": "Middle East",
"description": "Middle Eastern Curricula"
}
},
{
"@attributes": {
"id": "8",
"name": "North America",
"description": "North American Curricula"
}
},
{
"@attributes": {
"id": "9",
"name": "South America",
"description": "South American Curricula"
}
}
]
}
}
and i am using the following code to access it:
var url = "http://abc.com/abcjsn.json"
$.ajax({
url: url,
dataType: 'jsonp',
data: {},
success: function(data) { alert(data); },
jsonp: 'jsonp'
});
But i am not able to access it. it newer goes to alert. how can i do it.