AnsweredAssumed Answered

How to display elements in 'DOM' console

Question asked by Sara_EL_MALKI on May 12, 2017
Latest reply on May 16, 2017 by Sara_EL_MALKI

Hi everyone,

In order to understand how some functions work and to know the structure of the result of functions, I wanna display them in my 'DOM' console in the 'Inspect element' functionality, I have found accidentally this in my 'DOM' :


the dom of  a featureLayer

How can I do the same thing for every variable ?

Rebecca Strauch John Zhang

EDIT: of course I've tried console.log(featureLayer) id gives me "[Object Object]" which is not helpful for sure, as example I wanna get the structure of the result of this function " RelatedRecords" that I can use it properly (I wan it to show me a structure like in the screen above)

featureLayerT.on("click", function(evt) {
graphicAttributes = evt.graphic.attributes;
var relatedQuery = new RelationshipQuery();
relatedQuery.outFields = ["nom","code","tel"];
relatedQuery.relationshipId = 14;
relatedQuery.objectIds = [graphicAttributes.objectid];
featureLayerT.queryRelatedFeatures(relatedQuery, function(relatedRecords) {