0
ムービースケジュールに関するAPIを取得しようとしています。しかし、json出力は私が望むものではありませんでした。映画でソートされていない劇場でソートしたいのですが。だから、私はjsonの価値の位置を変更する必要がありますか?この私がAPI私はAPIからのPHP JSON位置の変更
{
"data": [
{
"theater": "theater A",
"schedule": [
{
"movie": "Movie A",
"time": [
"13:00",
"15:00",
"17:00",
"19:00",
"21:00"
],
"price": "Rp.60,000"
},
{
"movie": "Movie B",
"time": [
"13:00",
"15:00",
"17:00",
"19:00",
"21:00"
],
"price": "Rp.50,000"
}
]
}
{
"theater": "theater B",
"schedule": [
{
"movie": "Movie A",
"time": [
"13:00",
"15:00",
"17:00",
"19:00",
"21:00"
],
"price": "Rp.60,000"
},
{
"movie": "Movie B",
"time": [
"13:00",
"15:00",
"17:00",
"19:00",
"21:00"
],
"price": "Rp.50,000"
}
]
}
]
}
それとも劇場でソートされた第一の出力JSONを作るための可能な方法があるにしたいものをJSON
{
"data": [
{
"movie": "movie A",
"schedule": [
{
"theater": "theater A",
"time": [
"13:00",
"15:00",
"17:00",
"19:00",
"21:00"
],
"price": "Rp.60,000"
},
{
"theater": "theater B",
"time": [
"13:00",
"15:00",
"17:00",
"19:00",
"21:00"
],
"price": "Rp.50,000"
}
]
}
{
"movie": "movie B",
"schedule": [
{
"theater": "theater A",
"time": [
"13:00",
"15:00",
"17:00",
"19:00",
"21:00"
],
"price": "Rp.60,000"
},
{
"theater": "theater B",
"time": [
"13:00",
"15:00",
"17:00",
"19:00",
"21:00"
],
"price": "Rp.50,000"
}
]
}
]
}
そしてここから得た出力JSON。何か案が?