I have a huge JSON return from an API that produces many possible returned items. I've found that programming the PHP variables to decode this JSON and then echo it back into a table on a page has been very time consuming. This got me thinking that there must be some way to load a JSON file and auto generate the PHP strings needed to parse and control each item.
Here's an example...
$one = $data['json']['item1']['subitem1'];
$two = $data['json']['item1']['subitem2'];
This JSON return I'm working with has about 500 possible items, is there some kind of program or even a small script anyone knows of that can generate these variables for me?