ShareShortcuts

Extract Keys/Values from Dictionary

Extract key/values from a dictionary action

theslug
Fork “Extract Keys/Values from Dictionary”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so theslug gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
40K
Saved
0
Actions
11
Category
API
Version
1.0
Language
EN

Extract key/values from a dictionary action. Can someone do the opposite? (Take a list of keys/values and import them into a dictionary action)

What's New

Version 1.0

First release

Version History
1.0 Jul 25, 2022

First release

What it does

11 actions
  1. Choose from Menu
  2. Choose from Menu
    Keys
  3. Dictionary
  4. Get Dictionary Value
  5. Combine Text
  6. Quick Look
  7. Choose from Menu
    Values
  8. Dictionary
  9. Get Dictionary Value
  10. Combine Text
  11. Quick Look

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#define color taupe
#define glyph lifePreserver


menu nil {
item "Keys":
	const Dictionary = {
		"Eight": "8",
		"Five": "5",
		"Four": "4",
		"Nine": "9",
		"One": "1",
		"Seven": "7",
		"Six": "6",
		"Ten": "10",
		"Three": "3",
		"Two": "2"
	}
	const DictionaryValue = getKeys(Dictionary)
	const CombinedText = joinText(DictionaryValue)
	quicklook(CombinedText)
item "Values":
	const Dictionary1 = {
		"Eight": "8",
		"Five": "5",
		"Four": "4",
		"Nine": "9",
		"One": "1",
		"Seven": "7",
		"Six": "6",
		"Ten": "10",
		"Three": "3",
		"Two": "2"
	}
	const DictionaryValue1 = getValues(Dictionary1)
	const CombinedText1 = joinText(DictionaryValue1)
	quicklook(CombinedText1)
}
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by theslug

See All

You Might Also Like

See All
Advertisement