Hello again all. I am still having problems accessing individual layers within my WebMap thru the js API.
if I have loaded an existing webmap visually in my app-
I think you have a typo. It's findLayerById.
You need to either wait for view.when() or call the webmap.loadAll(), both are promises so you can await them or use promise.then().