I have a component which writes/generates javascript from a server side renderer. This component can be used in multiple times in a same page. However, once the page is loaded I have to collect all the variables or JSO written by this multiple components in the page. How can I do this so that I will have a collection of all the variables or JSO? For e.g. If this component (lets say ) is used twice in the page then it emits two javascript block on client/browser - var arr1 = new Array['First', 'Second'] and var arr2 = new Array['Third', 'Fourth'].
In order to make a final rendering I have to combine these two arrays.