Iterate through all the widgets available in a view by code.
Hi.
I want to iterate through all the widgets available in a view through JavaScript. I can access the list of all the widgets through this:
console.log($scope.view.wdg);
I observe that this is in JSON format. However, when I do
console.log(Object.keys($scope.view.wdg).length);
, which would return the number of keys in a JSON object, it logs "0".
Has anyone iterated through all the widgets available in a view before? If so, any help would be appreciated.
Thank you.

