This is my code:
var layer = new GeoJSONLayer({
url: "<URL>",
outFields: ["*"],
popupTemplate: {
title: "{name}",
content: generateContent
},
});
function generateContent(feature){
var graphic = feature.graphic;
var attributes = graphic.attributes;
console.log(attributes); // every attribute shows up, but the array attribute is missing
var content = "";
return content;
}
map.layers.add(layer);
Firstly none of my attributes were showing up, until I added this to my layer parameters:
outFields: ["*"]
Sadly setting the outFields didn't include the array in the attributes.
I have checked the json and the array attribute is there.
What could be happening here for the array not to show up in the attributes?