Skip to content

Commit

Permalink
docs(Readme): Add documentation for nested array
Browse files Browse the repository at this point in the history
  • Loading branch information
Belphemur authored Jun 30, 2022
1 parent 672c5b1 commit 4ee4026
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,34 @@ db.getIndex("/arraytest/myarray", "test", "name");

// It's useful if you want to delete some object
db.delete("/arraytest/myarray[" + db.getIndex("/arraytest/myarray", 65464646155) + "]");
```

#### Nesting in Array
```javascript
// You can easily access any nested array and their object
//You can also append to nested array other array
db.push("/arraytest/myarray",
[
[
{
obj: 'test'
},
{
obj: 'hello'
}
],
[
{
obj: 'world'
}
]
]
, true);

//This will return the first object (obj: 'test')

db.getData("/arraytest/myarray[0][0]");

```
### Exception/Error
#### Type
Expand Down

0 comments on commit 4ee4026

Please sign in to comment.