Help about the block: Map Values ?

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Posts: 3
Joined: 20 Jan 2020 11:31

Help about the block: Map Values ?

Post by Hit » 25 Mar 2020 01:41

Does anyone know how to use the Action block: Map Values?
  • I had read the help instruction but didn't understand.
  • It can be useful.
  • I'd like to use it.
Here is the automagic help:

Thank you!

User avatar
Posts: 2478
Joined: 21 Jul 2017 17:50

Re: Help about the block: Map Values ?

Post by Desmanto » 25 Mar 2020 17:04

The fastest way to learn it is to have something you want to achieve. We learn better while we need it. You can look at my index, section scripting - Map and list, to learn more : viewtopic.php?f=6&t=6993

We usually use map object just like a dictionary. We find a word inside dictionary and get the translation as the result. Usage case such as :
- translate word, "virus" >> a small infectious agent that replicates only inside the living cells of an organism
- Getting price from goods, "tissue" >> $5
- get product name from code, "123000456" >> apple
- getting date from the stored value, "birthday" >> 29 February 2020
- access other map, "attributes" >> return nested map object under this key

I never use map values action anymore nowadays. Because it is easier to use map object inside script. Look at here for simple map related function : viewtopic.php?f=5&t=7723
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply