Skip to content

Merge JSON

Actions
Merge JSON data from one file into another
v1.0.0
Latest
Star (1)

Merge json files

This action is designed to merge two (2) json files together. Specify the input file with new json data and library file where the data will be merged into. Optionally you can specify the root path for the json object.

Inputs

input-file

Required The name of the file with data to be merged into another file. This will overwrite data if the same key exists

library-file

Required The name of the master file to be combined with the data in 'input-file'

new-json-path

Optional The path to the object in the input-file to grab json data (recursively). Blank will merge fromt he root

old-json-path

Optional The path to the object in the input-file to grab json data (recursively). Blank will merge fromt he root

Outputs

time

For debugging purposes

Example usage

  call-merge-json:
    runs-on: ubuntu-latest
    steps:
      - uses: fiddlermikey/[email protected]
        with:
          new-json-path: 'person.firstname'
          input-file: json1.json
          library-file: json2.json

Merge JSON is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Merge JSON data from one file into another
v1.0.0
Latest

Merge JSON is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.