Hello
There is a way to execute a loop from a nested Json?
Here my situation, I call an API "getDogs" with this response:
{
"dogName": "Mello"
"ID_dogFavouriteFood": [
"4635275",
"6786768",
"5675675"
],
"favouriteParks": [
{
"parkName" : "Cascine",
"parkAddress": "Cascine street, 23"
}
{
"parkName" : "Vallombrosa",
"parkAddress" : "Contrada Vallombrosa, 1"
}
]
}
I'm trying to figure out how to loop "ID_dogFavouriteFood" and "favouriteParks" arrays (to write datas in different tables un mySQL db.
So I want to have something like that:
TABLE: DOGS
- Mello
TABLE: DOG_FAVOURITE_FOODS
- 4635275
- 6786768
- 5675675
TABLE: FAVOURITE_PARKS
- Cascine Cascine street, 23
- Vallombrosa Contrada Vallombrosa, 1
Thank you so much!