Power-up: Transforming Data

Learn how to transform list and object type data with the help of formula functions MAP, REDUCE, and MERGE.

The formula functions used in this video

Adding an index property to list items: MAP(pageVars.groceryList, SET_KEY( item, "index", index ))

Displaying a numbered list: current.index+1 + ". " + current.name

Finding the name of the cheapest item in the list: LOOKUP(REDUCE(pageVars.groceryList, IF(item.price < accumulator.price, item, accumulator)), "name")

Merging two objects into one:MERGE( [ {item: "ketchup", manufacturer: "Heinz"} , {item: "ketchup", price: 3.00} ] )