Bonjour , j'ai ce résultat:
Code javascript : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 {@attributes: { }} @attributes: {id: "2", xlink:href: "http://www.mondomaine.com/api/addresses/2"} __proto__: Object wbs.html:20 {@attributes: { }} @attributes: {id: "3", xlink:href: "http://www.mondomaine.com/api/addresses/3"} __proto__: Object wbs.html:20 {@attributes: { }} @attributes: {id: "1", xlink:href: "http://www.mondomaine.com/api/addresses/1"} __proto__: Object wbs.html:20 {@attributes: { }} @attributes: {id: "4", xlink:href: "http://www.mondomaine.com/api/addresses/4"} __proto__: Object
comment je fais pour juste obtenir les url ?
cette donnée provient d'un xml prestahop:
Code javascript : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 $.ajax({ url: "http://www.mondomainek.com/api/addresses", method : "GET", data : { ws_key : "...." } }).success(function(reponse_xml){ reponse_json = xmlToJson(reponse_xml); var liste_adresses = reponse_json.prestashop.addresses.address; liste_adresses.forEach(function(element) { console.log(element); }); })
merci d'avance de vos réponses
Partager