Dipen Bhikadya
Dipen Bhikadya

Reputation: 3321

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?

Upvotes: 7

Views: 1612

Answers (1)

Dipen Bhikadya
Dipen Bhikadya

Reputation: 3321

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

Upvotes: 10

Related Questions