6

次の JSON ファイルがあります。

{"Mensaplan": [{
        "Montag": [
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": false},
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": true, "bio": false},
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": false}
        ],

        "Dienstag": [
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": false},
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": true},
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": false}
        ],

        "Mittwoch": [
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": false},
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": true, "bio": false},
            {"food": "Schnitzl", "price": "4.00 €", "vegetarian": false, "bio": true}
        ],

        "Donnerstag": [
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": false},
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": false},
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": false}
        ],

        "Freitag": [
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": false},
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": false},
            {"food": "Schnitzl", "price": "5.00 €", "vegetarian": false, "bio": false}
        ]
    }]
}

「Mensaplan」を反復処理して、毎日取得したい (「Montag」、「Dienstag」、[...] (ドイツ語))。jQuery Method $.each を使用してこれを実行しようとしましたが、それぞれの名前が異なるため、ワイルドカードを作成する方法がわかりません。

誰でもこの問題で私を助けることができますか?

少し早いですがお礼を!

4

4 に答える 4