You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which led to an error because the list of useful objects is nested under the 3166-1 key.
I was able to load the data by adding the following json_array = json_array['3166-1']just after
which tells me it should be possible to add a config option for the JSON handler (similar to delimiter for CSV handler for instance) that tells it where to look for the data. At a minimum, a string defining the key under which to get a list of items (so in my example, it could be like data_path: "3166-1"), but I imagine it should be possible to declare a full path, something like data_path: "section.subheading.one_more_level" so that it can grab items from arbitrarily deep in the tree.
I might give it a try in a PR if it makes sense to add something like this (I think so, I have a couple of use cases for it already 😉 )
The text was updated successfully, but these errors were encountered:
I was trying to load a JSON file that looks like this (the actual file is here):
which led to an error because the list of useful objects is nested under the
3166-1
key.I was able to load the data by adding the following
json_array = json_array['3166-1']
just aftertap-spreadsheets-anywhere/tap_spreadsheets_anywhere/json_handler.py
Line 26 in 84f6b8e
which tells me it should be possible to add a config option for the JSON handler (similar to
delimiter
for CSV handler for instance) that tells it where to look for the data. At a minimum, a string defining the key under which to get a list of items (so in my example, it could be likedata_path: "3166-1"
), but I imagine it should be possible to declare a full path, something likedata_path: "section.subheading.one_more_level"
so that it can grab items from arbitrarily deep in the tree.I might give it a try in a PR if it makes sense to add something like this (I think so, I have a couple of use cases for it already 😉 )
The text was updated successfully, but these errors were encountered: