Search

HashMap

This document describes how to implement HashMap in a block coding manner.
Index

Definition of hashmap

HashMap is a data structure consisting of Key, the unique address value of the data, and Value

HashMap Block

It introduces the blocks registered in the HashMap category of SyncTree NBlock.

1) HashMap

Used to create (declare) a HashMap data structure.
Connect a Pair or Document Pair block to Values.
Click the button to add or remove Value items
Below is an example of the HashMap block declaration.

2) Get HashMap Variable

Use to bring the entire HashMap, or the Value of a specific Key.
Enter the variable name of the HashMap object to import information as the first factor.
From the second factor (Item Keys), enter the key to import the Value within HashMap.
If the value is not entered in the temp Keys, it will bring in the entire HashMap.
Click the button to add and remove Item Keys.
If Item Keys are added, the values are found by sequentially looking up the Keys in the HashMap of the nested structure.
Below is an example of using Get HashMap Variable Block.

3) Add HashMap Variable

Add Key and Value to HashMap
Enter the variable name of the HashMap object to add information to as the first factor.
Click the button to add and remove Item Keys.
Below is an example of using Add HashMap Variable Block.

4) Remove HashMap Variable

Remove Key and Value from HashMap
Enter the variable name of the HashMap object to import information as the first factor.
Click the button to add and remove Item Keys.
From the second factor (Item Keys), enter the key of the Value to remove within HashMap.
If Item Keys are added, the HashMap of the nested structure queries the keys sequentially and removes the values.
Below is an example of using Remove HashMap Variable Block.

HashMap Pair Block

Pair Key/Value data to HashMap through HashMap Pair blockset

1) Pair

Used for Key/Value mapping in HashMap.

2) Document Pair

Used for Key/Value mapping in HashMap.
The function is the same as the Pair block, and additional information is used to create an API Document.

3) DataType

Specify the data type of the parameter in the Document Pair block.
Type : string, integer, double, boolean, object, array

4) ContentType

Specify the Content Type of the parameter in the Document Pair block.
Type : application/json, application/xml, application/x-www-form-urlencoded, text/plain