[Solved] Programmatically identifying the hosted featurelayer and featurelayer view

venkat Asks: Programmatically identifying the hosted featurelayer and featurelayer view
I have hosted a feature layer in ArcGIS Online 10.8 and created a feature layer view from the hosted feature layer. I consumed these two as portal items in my webmap application using ESRI JavaScript API 4.19.

It is required to find out which one is the feature layer view from these two portal items through the JavaScript API.

Names will be unique for these layer but however the need is to identify from the property/methods of these layers.

Any suggestions?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.