An open API service indexing awesome lists of open source software.

https://github.com/yakubique/flat-json

Concat all arrays inside JSON array
https://github.com/yakubique/flat-json

flat github-actions json

Last synced: 2 months ago
JSON representation

Concat all arrays inside JSON array

Awesome Lists containing this project

README

          

# Flat JSON

[![Coverage](./badges/coverage.svg)](./badges/coverage.svg)
[![Test `flat-json` action](https://github.com/yakubique/flat-json/actions/workflows/test-myself.yaml/badge.svg)](https://github.com/yakubique/flat-json/actions/workflows/test-myself.yaml)

Concat all arrays inside array and return

[Usage workflow](https://github.com/yakubique/flat-json/actions/workflows/test-myself.yaml)

## Usage
```yaml
- name: Flat JSON
id: list
uses: yakubique/flat-json@v1.1
with:
input: '[[1], [2,3], [4,5], [6]]'

# result: "[1,2,3,4,5,6]"
```

## Inputs

| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|-----------|--------|----------|-----------|---------------------------|
| input | string | true | | Input JSON string or file |
| from_file | string | false | `"false"` | Load JSON from file |
| to_file | string | false | `"false"` | Save result to file |

## Outputs

| OUTPUT | TYPE | DESCRIPTION |
|--------|--------|-----------------------------------------------------------|
| result | string | Result list in JSON format (or file if `to_file = true`) |

----

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/S6S1UZ9P7)