var i, fieldName, fieldValue, fieldNamesArr = []; // This is how you can get the field names from an object. for (fieldName in idResult.feature.attributes) { if (idResult.feature.attributes.hasOwnProperty(fieldName)) { fieldNamesArr.push(fieldName); } } // Now use the field names to retrieve attributes for (i = 0; i < fieldNamesArr.length; i += 1) { fieldValue = idResult.feature.attributes[fieldNamesArr]; }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.