2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: split-by
|
|
|
|
layout: command
|
|
|
|
version: 0.59.0
|
|
|
|
---
|
2021-05-30 02:57:04 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Create a new table splitted.
|
|
|
|
|
|
|
|
## Signature
|
|
|
|
|
|
|
|
```> split-by (splitter)```
|
2021-05-30 02:57:04 +02:00
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
- `splitter`: the splitter value to use
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
split items by column named "lang"
|
|
|
|
```shell
|
2022-02-22 14:11:46 +01:00
|
|
|
>
|
2022-02-14 03:22:51 +01:00
|
|
|
{
|
|
|
|
'2019': [
|
|
|
|
{ name: 'andres', lang: 'rb', year: '2019' },
|
|
|
|
{ name: 'jt', lang: 'rs', year: '2019' }
|
|
|
|
],
|
|
|
|
'2021': [
|
|
|
|
{ name: 'storm', lang: 'rs', 'year': '2021' }
|
|
|
|
]
|
|
|
|
} | split-by lang
|
2022-02-22 14:11:46 +01:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
```
|