LINDEX
Syntax
LINDEX key index
Module
listCategories
fast list readDescription
Returns the list element at the given index.
Examples
- Go (Embedded)
- CLI
Returns the list element at the given index:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
element, err := db.LIndex("key", 2)
Returns the list element at the given index:
> LINDEX key 2