I have a JSON string:
{
"entry_offset" : 180587225765,
"entry_size" : 54003,
"created_time" : 1577500878,
"additional_meta" : {
"geohash64" : 5637765837143565,
"mime_type" : "image/jpg"
}
And I have converted it to Lua Table using Tarantool's module json:
table = json.decode(JSONstring)
Then I want to insert the table to Tarantool with ID = 1
box.space.somespace:insert{1, table}
The result is like this when I select the table which added to Tarantool database in JSON form:
Cannot access values through key
I can only access to table[1] and table[2]: table[1] is the ID = 1 while table[2] is all the JSON string. Which means I can't access the Values of JSON with Keys: table['entry_offset'], table['entry_size'], .... return nil when I try to access them
So how can I insert a Lua table to Tarantool and then access the values through its keys?
Thanh you so much for helping!!!