Unable to get root/node value


currently I am trying to extract data from a REST API. However the JSON response is structured oddly. In the image below you can see a sample, the numerical values (704, 1406, 1517) whcih represent userID's, aData represents a JSON Object.

I am able to extract the aData data. However I am not able to get the corresponding numeric values, since they are not a key:value pair. I suspect I am doing something wrong with my JSONPath and/or xpath. Below is party of my RSD file (except the methods):

<api:info title="data" desc="Generated schema file." xmlns:other="">    <!-- You can modify the name, type, and column size here. -->    <attr name="_id"xs:type="integer"readonly="false"  key="true"other:xPath="/_id"/>    <attr name="ID"xs:type="string"readonly="false"other:xPath(".")/>    <attr name="aData"xs:type="string"readonly="false"other:xPath="/*"/>    <input name="fromdate"xs:type="string"default=""/>  </api:info>  <api:set attr="DataModel" value="RELATIONAL" />  <api:set attr="JSONPath" value="*" />  <api:set attr="URI" value=">REDACTED<" />

Is there any way to extract those numerical values and add them to a (new) column?


Best answer by Thomas Lind 30 June 2021, 13:34

View original

3 replies

Userlevel 4
Badge +5

Hi Jasper

Is the numbers in an specific order and could you get them as a list in a get call?

If so you could probably do a loop of these numbers to only get the aData part.

Hi Thomas,

I receive them from lowest to highest.I think this is a result of a 'ORDER BY' in their DB, and the order does not really matter. The data also changes every week. Without the values the data is worthles, bercause I need them to create a relation between users and their aData.

My other option is to contact the API provider and ask them to change the API. I am not sure though, because I am quite new to TimeXtender.

Userlevel 4
Badge +5

Hi Jasper

If you first add the the numbers you can also use it in the a Data table you get out of it.

Write a support ticket to us, if you want a more specific solution.