I'm having an issue with JSONPath work. I have two very similar json objects that I am trying to get values from.
Essentially the objects roughly look like this:
Object1: {Company: {Organisation: {Official Name: "Name"}}
jsonpath1: Company..Organisation..Official Name
Object2: {Company: {Organisation:"Name"}}
jsonpath2: Company..Organisation
My issue is that I need both of these paths running. For Object2, this causes no issue as the first jsonpath doesn't return anything.
For object1 however, jsonpath 1 returns the required value. However, for this record jsonpath2 also returns the value Object object.
Is there any way to stop this from happening? I require both json paths. They both return the name of the company but unfortunately the data structure has changed - hence the issue