Google's new Research Bar is nifty
- May 16, 2012 1:50 PM
- Google+ Updates
- Comments (0)
If all you need to do is merge two simple structs, then StructAppend() is a great function to get you there, but if you have complex structs (meaning structs that contain structs) you may be wanting to find a solution that does a deep merge:
This code merges all sub structures as well as the core one. I'd also say it would be an easy adjustment to merge arrays and other data types if necessary. I'm not sure if CF10 will be adding something like this or not, but I know for CF9.0.1 I needed it.
I'm Jon Hartmann and I'm ColdFusion guru, Javascript fanatic, and UX/UI evangelist. Stay right here to read my technical posts as I grapple with mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web. Learn more about me.
Interested in becoming a sponsor? Contact me.