I have a list of tuples:
X = [{"alpha","beta"},{"gamma","theta"}].
I want to print X as a flat string using, io_lib:format("~s", [X])
in the following format:
[{"x":"alpha", "y":"beta"}, {"x":"gamma", "y":"theta"}]
How do I achieve this? I started using Map to do transform the list. But I was not able to print it as a string...(gave an unbound variable error on X).