{
"ServiceCurrentlyPlaying": {
"fn": "Slideshow-41958.mp4",
"apps": {
"ServiceCurrentlyPlaying": {
"state": "stopped"
}
}
}
}
How would I break anything named ServiceCurrentlyPlaying out of an array? (from json_decode(file, TRUE)
) This is probably an easy question to anyone that knows it, but I've been trying to do something that doesn't involve manually hardcoding each array into another empty array (like with a lot of foreach ($outer as $inner)
is what I'm doing but having issues since the amount of nesting varies)
Note: I have to deal with around 41958 files that all have different levels of nesting, different amounts and structure, so ..
Result I'd like would be:
{
"fn": "Slideshow-41958.mp4",
"apps": {
"state": "stopped"
}
}
Thanks, very much appreciated.