Write a program that prints an associative array (key-value) to a table.
- Standard loopholes are forbidden
- Please include a link to an online interpreter and the byte count in the answer
- Use box drawing characters to draw the table.
- You can write both a full program or a function.
- Key or value can't contain multiline strings.
- Value/key can't be an array/associative array ( example:
["a"=>["a"=>"b"]] or ["a"=>["a","b"]])
- If the programming language lacks of associative array , you can use a list of pairs. Example:
- You can insert horizontal lines between successive pairs.
- An input array can't be empty
This is a code-golf, the answer with the shortest byte count wins!
Your code must draw a vertical table like in the example from a associative array . The key must be at left and value must be at right and them needs to be separed,you can choose how separe them. Every key-value pair must be in another row. There must be only 2 columns for the keys and value.
┏━━━┓ ┃a┃b┃ ┃c┃d┃ ┃d┃d┃ ┗━━━┛