![]() |
|
Post Reply ![]() |
Author | |
mitesh281 ![]() Professional ![]() ![]() Joined: 24 Feb 2009 Location: India Points: 71 |
![]() ![]() ![]() ![]() ![]() Posted: 31 May 2021 at 12:01pm |
Hi,
I want to process email which has JSON text in it. I found a link to use "Read JSON Document" action. However my question is how can I process multiple blocks of JSON text because number of block will be different in each JSON formatted email. Below is a sample reference email text { "data": [ { "applicationName": "Test App", "Status": "Green", "account": "1111", "Duration_AppLoad": "10.10", "dbCluster": "Test_Cluster", }, { "applicationName": "Test App1", "Status": "Red", "account": "2222", "Duration_AppLoad": "11.11", "dbCluster": "Test_Cluster2" } ] } I want to insert value of applicationName, Status, account, duration_appload and dbcluster fields in the DB. I have used below format to fetch data /json/data/[1]/applicationName = %applicationName% /json/data/[2]/applicationName = %applicationName% How can we replace [1], [2] to make it dynamic? Thank you for help. Regards Edited by mitesh281 - 31 May 2021 at 12:07pm |
|
![]() |
|
Liam7982 ![]() Moderator Group ![]() ![]() Joined: 01 Sep 2021 Location: Stoke on Trent Points: 1 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Thank you for letting me know about this, If you are using TA5, you can use the extract field action to pull directly from the JSON, set it to a repeating block and call another automation to do the DB updates. However if you are doing this with TA4 the process is pretty similar as you just need to get the JSON output in a variable and do a regular extract from it, when doing this make sure to use the repeating block option. Kind regards Liam
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |