Wolfram Language

Cloud Storage & Operations

Operate on Parts of a Cloud Expression

Cloud expressions support efficient Part operations, evaluated directly in the cloud.

Create a cloud expression to store a scoreboard.

In[1]:=
Click for copyable input
ce = CreateCloudExpression[<| "Alice" -> <|"best" -> 12, "last" -> 3|>, "Bob" -> <|"best" -> 7, "last" -> 5|>, "Carlo" -> <|"best" -> 31, "last" -> 12|>|>, "scoreboard"]
Out[1]=

Retrieve the best score associated to both Alice and Bob.

In[2]:=
Click for copyable input
ce[{"Alice", "Bob"}, "best"]
Out[2]=

Update both scores of a user with a higher value.

In[3]:=
Click for copyable input
ce["Alice", {"best", "last"}] = 24
Out[3]=

Retrieve the whole cloud expression with the updated values and order entries by best score.

In[4]:=
Click for copyable input
Dataset[Get[ce]][SortBy[-Part[#, "best"] &]]
Out[4]=

Related Examples

de es fr ja ko pt-br ru zh