This is my JSON
1{2 "projectNumber": "123456",3 "name": "TX",4 "addendumValues": {56 "addendumGroups": [7 {8 "addendumGroupName": "G1",9 "rows": [10 {11 "columns": {12 "revnr_G1": [13 "Rev.1"14 ],15 "date_G1": [16 "2023-06-21T00:00:00.0000000"17 ]18 }19 }20 ]21 },2223 {24 "addendumGroupName": "G2",25 "rows": [26 {27 "columns": {28 "revnr_G2": [29 "Rev.1"30 ],31 "date_G2": [32 "2023-06-21T00:00:00.0000000"33 ]34 }35 },3637 {38 "columns": {39 "revnr_G2": [40 "Rev.2"41 ],42 "date_G2": [43 "2023-07-21T00:00:00.0000000"44 ]45 }46 },4748 {49 "columns": {50 "revnr_G2": [51 "Rev.3"52 ],53 "date_G2": [54 "2023-08-21T00:00:00.0000000"55 ]56 }57 } 58 ]59 }60616263 ]64 }65}xpath: /json/addendumGroups has multiple addendumGroupName, here i present only two.
I am trying to extract values for revnr_G1, date_G1, revnr_G2 and date_G2.
The code below only shows revnr_G1 and date_G1.
I am wondering why not revnr_G2 and date_G2 (please look away from case sensitivty)
1<api:info title="addendumGroups" desc="Generated schema file for TimeXtender." xmlns:other="http://apiscript.com/ns?v1">2 <!-- Attributes for the main JSON structure --> />3 <attr name="projectNumber" xs:type="string" readonly="false" other:xPath="/json/projectNumber" />45 <!-- Attributes for rows and columns -->6 <attr name="columns:revnr_g1" xs:type="string" readonly="false" other:xPath="/json/addendumValues/addendumGroups/rows/columns/revnr_g1" />7 <attr name="columns:date_g1" xs:type="string" readonly="false" other:xPath="/json/addendumValues/addendumGroups/rows/columns/date_g1" />89 <attr name="columns:revnr_g2" xs:type="string" readonly="false" other:xPath="/json/addendumValues/addendumGroups/rows/columns/revnr_g2" />10 <attr name="columns:date_g2" xs:type="string" readonly="false" other:xPath="/json/addendumValues/addendumGroups/rows/columns/date_g2" />1112</api:info>I have also tried something like this, which gave me nothing:
1<attr name="revnr_G1" xs:type="string" readonly="false" other:xPath="/json/addendumGroups[addendumGroupName='G1']/rows/columns/revnr_G1" />2 <attr name="date_G1" xs:type="string" readonly="false" other:xPath="/json/addendumGroups[addendumGroupName='G1']/rows/columns/date_G1" />345<attr name="revnr_G2" xs:type="string" readonly="false" other:xPath="/json/addendumGroups[addendumGroupName='G2']/rows/columns/revnr_G2" />6 <attr name="date_G2" xs:type="string" readonly="false" other:xPath="/json/addendumGroups[addendumGroupName='G2']/rows/columns/date_G2 />Also some times a group name, for example "addendumGroupName": "G2", contains multiple columns. How to i reterive all ?




