I have tried something like this:
var empty_list = ee.List([])
However, when adding items to this list, it returns an empty list regardless.
Here is a code snippet. Note that "col_list" is a variable representing an image collection.
var list = ee.List([]);
for(var i = 0; i < 5; i++){
var img = ee.Image(col_list.get(i));
var dictionary = ee.Dictionary({
coords: img.geometry().getInfo()["coordinates"],
landsat_id: img.get('LANDSAT_ID'),
satellite: img.get('SATELLITE'),
sensing_time: img.get('SENSING_TIME'),
system_index: img.get('system:index')
});
var feature = ee.Feature(null, dictionary);
var list = list.add(feature);
}
This definitely looks wrong but I am not sure how else to do so.