Search code examples
rethinkdb

Rethinkdb - Get first item of an array


My data structure

    {
      "group": "fruits"
      "items": ["apple", "orange", "banana"]
    }

I need to pull first item from the "items" array without knowing the value. Is it possible?


Solution

  • I think I figured out the answer. I can use "nth(0)" to get item at index 0.