In my angularjs application, i have a observer which always watch for 'notification' key in json array, if it is found. it will be displayed as notification. That is working behind notification.
so when ever i requested for any information as json. it will passthrough certain code. the code will check for any notification available to user. if so. it will create a notification key in the response json and matter will be injected in notification. how i alter response in EVENT Class.. i think using event is better for it. using hook method.
Any info appreciated. I want to do it just before the json astring creation in model hybrid
The easiest is probably to extend the Hybrid controller, and overload the after() method. There you can access the data array before it is converted to json.