ets / tap-spreadsheets-anywhere

GNU Affero General Public License v3.0
31 stars 62 forks source link

Extend "json_path" config option with JSONPath parser for deep nested data #42

Open TyShkan opened 1 year ago

TyShkan commented 1 year ago

Followup to https://github.com/ets/tap-spreadsheets-anywhere/issues/16

It would be quite helpful to parse more complex JSON-files, especially if it's http-responses from some API.

With actual JSONPath parser it could be done quickly and clean with a simple expression like response.data[*] applied to

{
  "response": {
    "data": [
      { "name": "row one", "key": 42 },
      { "name": "row two", "key": 43 }
    ]
  }
}

would return

[
  { "name": "row one", "key": 42 },
  { "name": "row two", "key": 43 }
]

which is the form of the data expected as input for the json format.

The same library is used by Meltano Singer SDK.