Six Stars

tWriteJson field output not working

I have some input data which I need to get converted to a json object. I am half-way there, but, cannot pin-point what to do to get it fully working. Any help is appreciated.

 

Original OP: 

abc;pqr;123
def;ghj;876

Expected JSON Object:

{
   "test_op":[
      {
         "lname":"abc",
         "fname":"pqr",
         "score":"123"
      },
      {
         "lname":"def",
         "fname":"ghj",
         "score":"876"
      }
   ]
}
  • Data Integration
Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Five Stars

Re: tWriteJson field output not working

hello,

can you look that corresponds to your expectation?(example3)

 

 

5 REPLIES
Six Stars

Re: tWriteJson field output not working

Shameless bump. I am unable to find a way to get the expected JSON output using tWriteJsonField. Any suggestion on how to mark an item as "Group"? Any other alternatives to creating a json object?

Thanks.
Moderator

Re: tWriteJson field output not working

Hello,

Sorry for delay.

We will check your attachment test_json.zip file and then come back to you as soon as we can.

Thanks for your time.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tWriteJson field output not working

hi,

what is your expected JSON output? (Structure).

Have an input and output example?

 

 

 

Five Stars

Re: tWriteJson field output not working

hello,

can you look that corresponds to your expectation?(example3)

 

 

Six Stars

Re: tWriteJson field output not working

Thank you so much. Example 3 worked for me. I am still baffled on why we need that "field1" value to be included in the grouping option (input and output). Other than that, it worked flawlessly. Thank you so much.