Service Virtualization

Expand all | Collapse all

I need to generate an excel/csv dynamically to save the field name and value of a json response separately . Can anyone help me on that?

  • 1.  I need to generate an excel/csv dynamically to save the field name and value of a json response separately . Can anyone help me on that?

    Posted Apr 28, 2017 04:10 AM

    I need to generate an excel/csv dynamically to save the field name and value of a json response in separate columns.

    For example, if json response has:

     

    {

    accountId : 12345,

    name: John

    }

     

    I need the output excel/csv to look like:

     

    accountId12345
    nameJohn

     

    Can anyone help me on this? 



  • 2.  Re: I need to generate an excel/csv dynamically to save the field name and value of a json response separately . Can anyone help me on that?
    Best Answer

    Broadcom Employee
    Posted Apr 28, 2017 12:17 PM

    Using Json path filter   create  filters for those values  {{accountID}}  and {{name}}.   You can then use the  Write to File  step  to write these properties to a file. 

    JSON Path Filter - DevTest Solutions - 9.5 - CA Technologies Documentation 

    Write to Delimited File - DevTest Solutions - 9.5 - CA Technologies Documentation 

     

    Hope this helps

     

     

    Thanks

     

    Shiney.