bonjour

j'aimerais parcourir un fichier json articulé comme cela :

Code : 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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
 
{
  "id": 9276,
  "number": 8824,
  "date": "2016-11-09T23:00:00Z",
  "project": "nom",
  "company": "UMT MARSEILLE",
  "relation_number": 845,
  "contact_name": "MARIE DUSSERRE",
  "phone": "04",
  "fax": "04 ",
  "email": "ma.fr",
  "employee": "LIAT",
  "holding": "st",
  "startdate": "0000-00-00T00:00:00Z",
  "stopdate": "0000-00-00T00:00:00Z",
  "total": 4227,
  "description": "",
  "subprojects": [
    {
      "routing": "A définir",
      "description": "OR",
      "startdate": "0000-00-00T00:00:00Z",
      "stopdate": "0000-00-00T00:00:00Z",
      "status": "",
      "base_price": 0,
      "unit_price": 120,
      "unit": 24,
      "run": 24,
      "price": 120,
      "remark": "Jobs: 1616113\rUMT MARSEILLE\rOR\r",
      "subjobs": {
        "id": 51340,
        "job_number": 1616113
      }
    },
    {
      "routing": "A définir",
      "description": "ORE\r11²",
      "startdate": "0000-00-00T00:00:00Z",
      "stopdate": "0000-00-00T00:00:00Z",
      "status": "",
      "base_price": 0,
      "unit_price": 381,
      "unit": 80,
      "run": 80,
      "price": 381,
      "remark": "Jobs: 1616176\rUMT E\rOR\r",
      "subjobs": {
        "id": 51476,
        "job_number": 1616176
      }
    },
    {
      "routing": "A définir",
      "description": "OR",
      "startdate": "0000-00-00T00:00:00Z",
      "stopdate": "0000-00-00T00:00:00Z",
      "status": "",
      "base_price": 0,
      "unit_price": 2297,
      "unit": 537,
      "run": 537,
      "price": 2297,
      "remark": "Jobs: 1616114\rUE\rOR²\r",
      "subjobs": {
        "id": 51341,
        "job_number": 1616114
      }
    },
    {
      "routing": "A définir",
      "description": "Oaux",
      "startdate": "0000-00-00T00:00:00Z",
      "stopdate": "0000-00-00T00:00:00Z",
      "status": "",
      "base_price": 0,
      "unit_price": 1051,
      "unit": 66,
      "run": 66,
      "price": 1051,
      "remark": "Jobs: 1616178\rLE\rO\r",
      "subjobs": {
        "id": 51490,
        "job_number": 1616178
      }
    },
    {
      "routing": "A définir",
      "description": "Transport",
      "startdate": "0000-00-00T00:00:00Z",
      "stopdate": "0000-00-00T00:00:00Z",
      "status": "",
      "base_price": 0,
      "unit_price": 373,
      "unit": 1,
      "run": 1,
      "price": 373,
      "remark": "Jobs: 1616118\rUMT MLLE\rTransport\r",
      "subjobs": {
        "id": 51348,
        "job_number": 1616118
      }
    },
    {
      "routing": "A définir",
      "description": "Contribution à notre démarche environnementale et à son amélioration continue",
      "startdate": "0000-00-00T00:00:00Z",
      "stopdate": "0000-00-00T00:00:00Z",
      "status": "",
      "base_price": 0,
      "unit_price": 5,
      "unit": 1,
      "run": 1,
      "price": 5,
      "remark": "Jobs: 1616119\rUMT MARSEILLE\rContribution à notre démarche environnementale et à son amélioration continue\r",
      "subjobs": {
        "id": 51349,
        "job_number": 1616119
      }
    }
  ]
}
et ne récupérer que les [0][subprojects][id]
mais je ne vois pas comment faire.
Pour récupérer ce qu'il y a au premier niveau pas de problème, mais des que je veux descendre dans l’arborescence cela ne fonctionne plus.

Auriez vous une idée s'il vous plait ?

merci.