Geographic Information Systems Asked by balakumaran on January 25, 2021
A simple script in the Google Earth Engine code editor,
var dict = ee.Dictionary();
dict.set('num', 10);
print(dict);
gives Object (0 properties)
as the output
even when i do print(dict.keys())
or print(dict.values())
it throws empty list.
How do I pass a key,value pair to a dictionary?
you need to assign your new dictionary to an existing or new variable:
var dict = ee.Dictionary();
dict = dict.set('num', 10);
print(dict);
Correct answer by korndog on January 25, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP