I'm trying to parse a json file, Suppose the function that is called takes in the json path from a variable called section1
def traverseJson(arg1):
#do stuff
section1 = json["section"]["section"][1]
To call the function I'd run:
traverseJson(section1)
How would I then pass in multiple arguments into the function? e.g
section2 = json["section"]["subsection"][0]
section3 = json["section"]["subsection"][0]
A solution which does not predefine the number of arguments will be more suitable as the number of arguments can vary.