I parsed a JSON file with json_decode, and the result is a long multidimensional array like the following:
Array
(
[Basic] => Array
(
[0] => Array
(
[text] => Taunt.
[playerClass] => Shaman
[locale] => enUS
[mechanics] => Array
(
[0] => Array
(
[name] => Taunt
)
)
)
)
[Classic] => Array
(
[0] => Array
(
[cardId] => CS2_188o
[name] => 'Inspired'
[mechanics] => Array
(
[0] => Array
(
[name] => OneTurnEffect
)
)
)
)
)
I want to use a foreach to insert the data into a datatable but I can't make it work with this multidimensional array. How would I do that?