Re: Thinking out loud - a continuation...
| From: | Jay Blanchard | Date: | Sun, 25 Mar 2012 16:02:12 +0000 |
| Subject: | Re: Thinking out loud - a continuation... | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317259@lists.php.net to get a copy of this message | ||
[snip]
a necessary part of building the structure. It can be removed but only as a post process. Why does
it have to be removed? You can loop through the structure in JavaScript without paying heed to the
key's value.
>
> If it absolutely must go... you need to recurse through the final structure replacing each
> "children" entry with the results of passing it through array_values().
[/snip]
Unfortunately the user of the JSON will not make a change to their app. I have looked through the
JSON to confirm that this has a particular pattern so I think I can just do a little regex and get
it squared away. This is one of "those" projects. It is apparently going to be trying
every step of the way.