This is my JSON
{
"projectNumber": "123456",
"name": "TX",
"addendumValues": {
"addendumGroups": [
{
"addendumGroupName": "G1",
"rows": [
{
"columns": {
"revnr_G1": [
"Rev.1"
],
"date_G1": [
"2023-06-21T00:00:00.0000000"
]
}
}
]
},
{
"addendumGroupName": "G2",
"rows": [
{
"columns": {
"revnr_G2": [
"Rev.1"
],
"date_G2": [
"2023-06-21T00:00:00.0000000"
]
}
},
{
"columns": {
"revnr_G2": [
"Rev.2"
],
"date_G2": [
"2023-07-21T00:00:00.0000000"
]
}
},
{
"columns": {
"revnr_G2": [
"Rev.3"
],
"date_G2": [
"2023-08-21T00:00:00.0000000"
]
}
}
]
}
]
}
}
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)
<api:info title="addendumGroups" desc="Generated schema file for TimeXtender." xmlns:other="http://apiscript.com/ns?v1">
<!-- Attributes for the main JSON structure --> />
<attr name="projectNumber" xs:type="string" readonly="false" other:xPath="/json/projectNumber" />
<!-- Attributes for rows and columns -->
<attr name="columns:revnr_g1" xs:type="string" readonly="false" other:xPath="/json/addendumValues/addendumGroups/rows/columns/revnr_g1" />
<attr name="columns:date_g1" xs:type="string" readonly="false" other:xPath="/json/addendumValues/addendumGroups/rows/columns/date_g1" />
<attr name="columns:revnr_g2" xs:type="string" readonly="false" other:xPath="/json/addendumValues/addendumGroups/rows/columns/revnr_g2" />
<attr name="columns:date_g2" xs:type="string" readonly="false" other:xPath="/json/addendumValues/addendumGroups/rows/columns/date_g2" />
</api:info>
I have also tried something like this, which gave me nothing:
<attr name="revnr_G1" xs:type="string" readonly="false" other:xPath="/json/addendumGroups[addendumGroupName='G1']/rows/columns/revnr_G1" />
<attr name="date_G1" xs:type="string" readonly="false" other:xPath="/json/addendumGroups[addendumGroupName='G1']/rows/columns/date_G1" />
<attr name="revnr_G2" xs:type="string" readonly="false" other:xPath="/json/addendumGroups[addendumGroupName='G2']/rows/columns/revnr_G2" />
<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 ?