Bonjour,

j'ai le tableau suivant :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
var perso = [];
perso.push({attributCategorie: "categorie 1", attributLibelle: "Mage", attributFlag: true, valeur: 80, Point: 1});
perso.push({attributCategorie: "categorie 1", attributLibelle: "Mage", attributFlag: true, valeur: 60, Point: 0.75});
perso.push({attributCategorie: "categorie 1", attributLibelle: "Elfe", attributFlag: true, valeur: 40, Point: 0.5});
perso.push({attributCategorie: "categorie 1", attributLibelle: "Elfe Commercial", attributFlag: true, valeur: 10, Point: 0});
perso.push({attributCategorie: "categorie 2", attributLibelle: "Guerrier", attributFlag: true, valeur: 100, Point: 0.75});
perso.push({attributCategorie: "categorie 2", attributLibelle: "Guerrier", attributFlag: true, valeur: 200, Point: 0.5});
j'aimerais obtenir un JSON (de facon dynamique) sous la forme :

perso
Categorie1

Mage
80 , 1
60, 0.75

Elfe
40, 0.5
10, 0


Categorie2
Guerrier
100, 0.75
200, 0.5

Comment je peux faire pour faire une sorte de parseur ?

Merci d'avance