Rethinkdb - 获取数组的第一项
Rethinkdb - Get first item of an array
我的数据结构
{
"group": "fruits"
"items": ["apple", "orange", "banana"]
}
我需要在不知道值的情况下从 "items" 数组中提取第一项。可能吗?
我想我找到了答案。我可以使用 "nth(0)" 获取索引 0 处的项目。
我的数据结构
{
"group": "fruits"
"items": ["apple", "orange", "banana"]
}
我需要在不知道值的情况下从 "items" 数组中提取第一项。可能吗?
我想我找到了答案。我可以使用 "nth(0)" 获取索引 0 处的项目。