On 12-03-24 04:11 PM, Jay Blanchard wrote:
One more little tweak may be required. The JSON looks like this

{"Executives and Management":{"name":"Executives and Management","children":{

The first part {"Executives and Management": needs to be removed. I think I 
know what to do.

It has become painfully obvious that I do not know what to do. Ready to call it 
a day. Besides I just burned my finger setting up the smoker for the ribs.

It's 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().

E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to