How to iterate objects in DOM and how to bypass 'Access-Control-Allow-Origin' error using cors-anywhere.