Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9063

Re: Transform JSON array with subobjects to internal table

$
0
0

So, I just tried something.  I created a structure and table type for the displayuserinfo object and added it to my agreements structure.  I did the following and now I get the data.

REPLACE FIRST OCCURRENCE OF 'userAgreementList' IN l_json WITH 'USERAGREEMENTLIST'.
   REPLACE ALL OCCURRENCES OF 'displayDate' IN l_json WITH 'DISPLAY_DATE'.
   REPLACE ALL OCCURRENCES OF 'fullNameOrEmail' IN l_json WITH 'FULL_NAME_OR_EMAIL'.
   REPLACE ALL OCCURRENCES OF ',"esign' IN l_json WITH '], "ESIGN'.
   REPLACE ALL OCCURRENCES OF 'agreementId' IN l_json WITH 'AGREEMENT_ID'.
   REPLACE ALL OCCURRENCES OF 'name' IN l_json WITH 'NAME'.
   REPLACE ALL OCCURRENCES OF 'status' IN l_json WITH 'STATUS'.
   REPLACE ALL OCCURRENCES OF 'displayUserInfo":' IN l_json WITH 'DISPLAY_USER_INFO":['.


Shouldn't there be some other standard way to get this data without having to hack it up like this?  The structure/table type isnt the issue but all the replace statements is insane depending on the JSON response.


Viewing all articles
Browse latest Browse all 9063

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>