i have json object and i want to fetch it by ajax call ,i wrote ajax but im getting error : i have one json object and i want to fetch it by calling ajax   [  { 	"color":"black", 	"productid":"1", 	"price":"1000" },   { 	"color":"blue", 	"productid":"2", 	"price":"2000" },   { 	"color":"green", 	"productid":"3", 	"price":"3000" },   { 	"color":"grey", 	"productid":"4", 	"price":"4000" },   { 	"color":"orange", 	"productid":"5", 	"price":"5000" },  { 	"color":"purple", 	"productid":"6", 	"price":"6000" },  { 	"color":"red", 	"productid":"7", 	"price":"7000" },  { 	"color":"violet", 	"productid":"8", 	"price":"8000" },  { 	"color":"white", 	"productid":"9", 	"price":"9000" },  { 	"color":"yellow", 	"productid":"10", 	"price":"10000" }, ] this is json file and i wrote ajax as below for this  $.ajax({         url: 'products.json',          dataType: 'json',         data: 'data',         success: function(data, status, xhr) {              alert(data);         },         error: function(xhr, status, error) {              alert(status);         } }); anyone can help me please ,thank you in advace 