GitHub Action
JSONify array
v1.1
Latest version
Replace field in JSON with its JSON.stringify() version
- name: JSONify array
uses: yakubique/jsonify-array@v1
with:
input: |
[ { "obj": {"id": 1 } } ]
type: "nested-json"
key: "obj"
# [ { "obj": "{\"id\":1}" } ]
INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
---|---|---|---|---|
input | string | true | JSON to modify | |
type | string | false | "flat-json" |
Type of input data ["flat-json", "nested-json"] (default: "flat-json") |
key | string | false | If type="nested-json" - which key should be used |
|
from_file | string | false | "false" |
Load json from file |
to_file | string | false | "false" |
Save result to file |
OUTPUT | TYPE | DESCRIPTION |
---|---|---|
result | string | Filepath or JSON |