Skip to content
Snippets Groups Projects
Commit 5ad26fe2 authored by Kirill Shcherbatov's avatar Kirill Shcherbatov Committed by Vladislav Shpilevoy
Browse files

tuple: add names_only option to build true dictionary

Now tuple:tomap() method returns a map with both field names and
field indexes, equal to the same field values. It is done to
1) allow to still access tomap() result like a tuple, by indexes;
2) allow to access non-named fields.

But is not useful, when a result map must be saved somewhere, for
example, in JSON - all its keys muse be strings. So allow to
get this behaviour using tuple:tomap({names_only = true}).

Fixes #3280
parent 57d3188d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment