I have a collaborative map, with collaborative maps as values. When an event happens on the value maps, I want to know to which key (of the outer map) the event belongs. Anyone can suggest a clean way of achieving this?
CMap(key, cmapb(k,string)) , ChangeEvent happens on cmapb string, I want to know key of CMap. k is unique only for individual key(so tracking k and then finding key which contains k is not an option).
ValueChangedEvent CollaborativeMap
Edit:
I am attaching the EventListener this way before adding records(cmapb) to CMAP:
records.addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED, updateJSON);
If I could pass the id of records on updateJSON, I could then iterate through CMAP to find which value has that id. Although I do not know how I can pass the id, as well as the ChangeEvent.