$("document").ready(
function () {
$.getJSON("French.json", function displayFromJson(french) {
console.log(french.firstName)
})
},
function () {
$.getJSON("english.json", function displayFromJson(english) {
console.log(english.lastName)
})
});
//json file 1 { "firstName": "Merci", "lastName": " Claudè" }
//json file 2 { "firstName": "Gracias", "lastName": "Claude" }
Aucun commentaire:
Enregistrer un commentaire