Here's something I do in many pieces of code on this site. Let's say that you have a list of things, lets say an array or a collection and you want to create a list of unique values. The .add() method of cJobject very handily only creates a child for new values.
That means that the above code, very usefully produces a list of unique values in the given array -
Even, better, cJobject can organize things into families.
You want to learn Google Apps Script?
Learning Apps Script, (and transitioning from VBA) are covered comprehensively in my my book, Going Gas - from VBA to Apps script, available All formats are available now from O'Reilly,Amazon and all good bookshops. You can also read a preview on O'Reilly.
See How to use cJobject for more on this useful object.Take a look at One Liners for more tips like this. In the meantime why not join our forum,follow the blog or follow me on twitter to ensure you get updates when they are available. You can this example in the cDataSet.xlsm from Downloads
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Get Started Snippets >