please help me
I've got a json file like this.
[
{
"Paket": [
{
"farbe": "#ff0000",
"Koordinaten": [
{
"paketaufenthaltsort": "469\/31 A 1; A 3; A 4",
"y": "5",
"x": "0"
},
{
"paketaufenthaltsort": "469\/31 A 1; A 3; A 4",
"y": "5",
"x": "150"
},
{
"paketaufenthaltsort": "469\/31 A 1; A 3; A 4",
"y": "0",
"x": "150"
}
],
"Paketnummer": "11000005"
}
],
"offset": "5",
"referenzzeitraum": "1440"
}
]
and now I want to have an array containing all values of "paketaufenthaltsort".
So I've tried the following:
console.log(data.map(function(d)
{return d.Paket.map(function(e)
{return e.Koordinaten.map(function(f) {return
f.paketaufenthaltsort;})})}));
But it produces an array of level 3. The outcome is:
[[["469/31 A 1; A 3; A 4", "469/31 A 1; A 3; A 4", "469/31 A 1; A 3; A 4"]]]
But what i want is:
["469/31 A 1; A 3; A 4"]
Please help me